New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 701539 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 673698



Sign in to add a comment

WebGL2RenderingContext[Base]#uniform[Matrix]*v: argument srcOffset should not be optional

Project Member Reported by lunalu@chromium.org, Mar 14 2017

Issue description

According to the spec, argument srcOffset should not be optional.

Also for WebGL2RenderingContext[Base]#compressedTexSubImage2D: the 8th argument srcOffset
 

Comment 1 by lunalu@chromium.org, Mar 14 2017

Summary: WebGL2RenderingContext#uniform*v and WebGL2RenderingContextBase#uniform*v: argument srcOffset should not be optional (was: WebGL2RenderingContext#uniform*v and WebGL2RenderingContextBase#uniform*v: 2nd argument srcOffset should not be optional)

Comment 2 by lunalu@chromium.org, Mar 14 2017

Description: Show this description

Comment 3 by lunalu@chromium.org, Mar 14 2017

Summary: WebGL2RenderingContext[Base]#uniform[Matrix]*v: argument srcOffset should not be optional (was: WebGL2RenderingContext#uniform*v and WebGL2RenderingContextBase#uniform*v: argument srcOffset should not be optional)

Comment 4 by lunalu@chromium.org, Mar 14 2017

Here is the complete list:
WebGL2RenderingContext.compressedTexSubImage2D.arg8:srcOffset
WebGL2RenderingContext.uniform1fv.arg2:srcOffset
WebGL2RenderingContext.uniform1fv.arg2:srcOffset
WebGL2RenderingContext.uniform1iv.arg2:srcOffset
WebGL2RenderingContext.uniform1iv.arg2:srcOffset
WebGL2RenderingContext.uniform2fv.arg2:srcOffset
WebGL2RenderingContext.uniform2fv.arg2:srcOffset
WebGL2RenderingContext.uniform2iv.arg2:srcOffset
WebGL2RenderingContext.uniform2iv.arg2:srcOffset
WebGL2RenderingContext.uniform3fv.arg2:srcOffset
WebGL2RenderingContext.uniform3fv.arg2:srcOffset
WebGL2RenderingContext.uniform3iv.arg2:srcOffset
WebGL2RenderingContext.uniform3iv.arg2:srcOffset
WebGL2RenderingContext.uniform4fv.arg2:srcOffset
WebGL2RenderingContext.uniform4fv.arg2:srcOffset
WebGL2RenderingContext.uniform4iv.arg2:srcOffset
WebGL2RenderingContext.uniform4iv.arg2:srcOffset
WebGL2RenderingContext.uniformMatrix2fv.arg3:srcOffset
WebGL2RenderingContext.uniformMatrix2fv.arg3:srcOffset
WebGL2RenderingContext.uniformMatrix3fv.arg3:srcOffset
WebGL2RenderingContext.uniformMatrix3fv.arg3:srcOffset
WebGL2RenderingContext.uniformMatrix4fv.arg3:srcOffset
WebGL2RenderingContext.uniformMatrix4fv.arg3:srcOffset
WebGL2RenderingContextBase.compressedTexSubImage2D.arg8:srcOffset
WebGL2RenderingContextBase.uniform1fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform1fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform1iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform1iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform2fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform2fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform2iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform2iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform3fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform3fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform3iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform3iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform4fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform4fv.arg2:srcOffset
WebGL2RenderingContextBase.uniform4iv.arg2:srcOffset
WebGL2RenderingContextBase.uniform4iv.arg2:srcOffset
WebGL2RenderingContextBase.uniformMatrix2fv.arg3:srcOffset
WebGL2RenderingContextBase.uniformMatrix2fv.arg3:srcOffset
WebGL2RenderingContextBase.uniformMatrix3fv.arg3:srcOffset
WebGL2RenderingContextBase.uniformMatrix3fv.arg3:srcOffset
WebGL2RenderingContextBase.uniformMatrix4fv.arg3:srcOffset
WebGL2RenderingContextBase.uniformMatrix4fv.arg3:srcOffset

Comment 5 by lunalu@chromium.org, Mar 15 2017

Cc: foolip@chromium.org
The WebGL1 uniform*v signatures are visible here, so srcOffset has to be non-optional to avoid conflicts. The effect is the same: if uniform*v is called with only two arguments, it goes to the WebGL1 signatures; if it's called with three or four arguments, it goes to the WebGL2 specific signatures.

This makes sense to me, in this case, should we just leave it as the way it is? foolip@, WDYT?

Comment 6 by foolip@chromium.org, Mar 21 2017

Cc: zmo@chromium.org
What I see in our IDL files makes sense, at least the uniformMatrix4fv case that I looked at. 3 arguments is WebGL1, and >3 arguments is WebGL2. It's unusual on the web platform to version APIs like this instead of just continuing to update a single spec and introducing optional arguments to existing methods, but it's not wrong.

It doesn't match the way that the spec expresses this, and it'd be interesting to learn why that is. Perhaps there are bugs in our bindings generated that necessitated this workaround? zmo@?

Comment 7 by zmo@chromium.org, Mar 21 2017

Cc: kbr@chromium.org
This is just for implementation convenience since default arg values are not allowed in chromium.

The end results are spec compliant.

Comment 8 by kbr@chromium.org, Mar 21 2017

Talking with zmo@ -- neither he or I remember this situation exactly -- but we are pretty sure that we tried picking up exactly the WebGL 2.0 and 1.0 IDL in this area. There was some problem with shadowing the WebGL 1.0 entry points that made it much easier to just make the srcOffset arguments optional. I don't remember the details, sorry.

I assume we are now validating Blink's IDL against the HTML5 IDL? That's great. Who is going to investigate discrepancies like this? Our team is swamped.

Comment 9 by foolip@chromium.org, Mar 22 2017

Cc: markdittmer@chromium.org
Status: WontFix (was: Untriaged)
#8, markdittmer@ is working on tooling to compare Blink's IDL against all of the specs linked in our IDL files. lunalu@ and I have been trying to use early versions of the tool to find interesting things and file bugs, and this is one.

Since the net result is most likely indistinguishable from the spec in this case, nobody will be in a rush to investigate this, so let's WontFix it and come back to it when it comes up again in said tooling.

markdittmer@, do you have a link to the WIP tooling that we can point people to in contexts like this?

Sign in to add a comment