Bug 189625 - WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
Summary: WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-14 13:00 PDT by Justin Fan
Modified: 2018-09-25 17:25 PDT (History)
10 users (show)

See Also:


Attachments
Patch (23.70 KB, patch)
2018-09-25 13:34 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (23.86 KB, patch)
2018-09-25 15:29 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (24.13 KB, patch)
2018-09-25 15:52 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2018-09-14 13:00:31 PDT
WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
Comment 1 Justin Fan 2018-09-14 13:01:09 PDT
<rdar://problem/42882620>
Comment 2 Justin Fan 2018-09-17 15:28:02 PDT
Patch is ready to go; waiting on updates to webgl testing framework before uploading.
Comment 3 Justin Fan 2018-09-20 17:14:45 PDT
Thanks to the new tests, regressions: Unexpected text-only failures (6)
  webgl/2.0.0/conformance/extensions/angle-instanced-arrays-out-of-bounds.html [ Failure ]
  webgl/2.0.0/conformance/rendering/draw-elements-out-of-bounds.html [ Failure ]
  webgl/2.0.0/conformance2/rendering/instanced-arrays.html [ Failure ]
  webgl/2.0.0/conformance2/rendering/instanced-rendering-bug.html [ Failure ]
  webgl/2.0.0/conformance2/rendering/out-of-bounds-index-buffers-after-copying.html [ Failure ]
  webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object.html [ Failure ]
Comment 4 Justin Fan 2018-09-21 16:26:50 PDT
Regressions are fixed (on mac), but unfortunately there are no new passes within the webgl/conformance and conformance2 tests, only in the long-running deqp suite.

Whipping up a basic test case to verify primitive restart functionality.
Comment 5 Justin Fan 2018-09-25 13:34:10 PDT
Created attachment 350780 [details]
Patch
Comment 6 EWS Watchlist 2018-09-25 13:36:49 PDT
Attachment 350780 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:721:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:722:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:723:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Dean Jackson 2018-09-25 13:53:34 PDT
Comment on attachment 350780 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350780&action=review

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:2009
> +unsigned WebGLRenderingContextBase::getMaxIndex(const RefPtr<JSC::ArrayBuffer> elementArrayBuffer, GC3Dintptr uoffset, GC3Dsizei n)

I think you should pass in numElements raw, and do the / sizeof(T) inside here, the same way you do with the uoffset.

> Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:2053
> +        maxIndex = getMaxIndex<GC3Duint>(buffer, offset, count);

... although I assume count here has already take the sizeof(T) into account?

> LayoutTests/webgl/webgl2-primitive-restart-expected.html:54
> +        if(!isWebGL2) {

Nit: if <space> (
Comment 8 Justin Fan 2018-09-25 14:16:38 PDT
(In reply to Dean Jackson from comment #7)
> Comment on attachment 350780 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=350780&action=review
> 
> > Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:2009
> > +unsigned WebGLRenderingContextBase::getMaxIndex(const RefPtr<JSC::ArrayBuffer> elementArrayBuffer, GC3Dintptr uoffset, GC3Dsizei n)
> 
> I think you should pass in numElements raw, and do the / sizeof(T) inside
> here, the same way you do with the uoffset.
> 
> > Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:2053
> > +        maxIndex = getMaxIndex<GC3Duint>(buffer, offset, count);
> 
> ... although I assume count here has already take the sizeof(T) into account?

Yes, count as passed into the parent function is already the correct number.

Tryna figure out why the compilers aren't liking my function template.
Comment 9 Justin Fan 2018-09-25 15:29:40 PDT
Created attachment 350802 [details]
Patch
Comment 10 EWS Watchlist 2018-09-25 15:32:15 PDT
Attachment 350802 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:721:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:722:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:723:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Justin Fan 2018-09-25 15:52:34 PDT
Created attachment 350806 [details]
Patch
Comment 12 EWS Watchlist 2018-09-25 15:54:28 PDT
Attachment 350806 [details] did not pass style-queue:


ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:721:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:722:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
ERROR: Source/WebCore/platform/graphics/GraphicsContext3D.h:723:  enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums.  [readability/enum_casing] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 WebKit Commit Bot 2018-09-25 17:24:59 PDT
Comment on attachment 350806 [details]
Patch

Clearing flags on attachment: 350806

Committed r236490: <https://trac.webkit.org/changeset/236490>
Comment 14 WebKit Commit Bot 2018-09-25 17:25:01 PDT
All reviewed patches have been landed.  Closing bug.