Open greggman opened 4 years ago
HTML spec talks in terms of "presentation" instead of "compositing", fwiw.
Absent spec language otherwise, colorMask/RASTERIZER_DISCARD/drawBuffers([NONE]) don't prevent draw commands marking a canvas for presentation/composition.
It would be good to spec that drawArrays, drawElements, clear, clearBuffer, blitFramebuffer, and probably invalidate*Framebuffer act the same in this regard.
Agreed - it would also be feasible to avoid marking the canvas as needing presentation if RASTERIZER_DISCARD is enabled. However, until reftests are added to the WebGL conformance suite (using the wpt harness), it won't be possible to verify such spec language. Effort should probably first be expended in getting such reftests in place. This would expose issues and prevent regressions in handling of things like the premultipliedAlpha context creation attribute.
I'm probably missing it but the WebGL 2.0 spec doesn't mention compositing at all or at least a search for "compositing" doesn't get any hits.
The WebGL 1.0 spec says
and later
cases not covered include the other forms of draw in WebGL2
drawArraysInstanced
,drawElementsInstanced
,drawRangeElements
, alsoblitFrambuffer
.Also maybe not ambigous in the spec but if rasterization is disabled. For example
gl.colorMask(false, false, false, false)
orgl.enable(gl.RASTERIZER_DISCARD)
orgl.drawBuffers([gl.NONE])
whether or not compositing should be triggered. As it is it seems like the spec says it should be triggered but it seem counter inituitive that not actually drawing to the canvas would cause a composite operation to be scheduled