WebGL2RenderingContext[Base]#uniform[Matrix]*v: argument srcOffset should not be optional |
|||||||
Issue descriptionAccording to the spec, argument srcOffset should not be optional. Also for WebGL2RenderingContext[Base]#compressedTexSubImage2D: the 8th argument srcOffset
,
Mar 14 2017
,
Mar 14 2017
,
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
,
Mar 15 2017
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?
,
Mar 21 2017
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@?
,
Mar 21 2017
This is just for implementation convenience since default arg values are not allowed in chromium. The end results are spec compliant.
,
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.
,
Mar 22 2017
#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 |
|||||||
Comment 1 by lunalu@chromium.org
, Mar 14 2017