From zmo...@ Thu Dec 17 16:53:37 2015 From: zmo...@ (Zhenyao Mo) Date: Thu, 17 Dec 2015 16:53:37 -0800 Subject: [Public WebGL] Out-of-bounds ReadPixels and CopyTex*Image* behavior In-Reply-To: References: Message-ID: I just uploaded a pull request for this change: https://github.com/KhronosGroup/WebGL/pull/1384 Please review. Note that I didn't change the CopyTexImage behavior, because we don't want to expose uninitialized vram to user code. Mo On Mon, Nov 9, 2015 at 1:15 PM, Jeff Gilbert wrote: > > The values read are undefined in the GLES spec. > > On Mon, Nov 9, 2015 at 8:14 AM, Jukka Jyl?nki wrote: >> What is the native OpenGL behavior on these? >> >> 2015-11-03 7:34 GMT+02:00 Jeff Gilbert : >>> >>> >>> Same here, unfortunately. I do enjoy deleting code though. :) >>> >>> I can do the PR for this. >>> >>> On Mon, Nov 2, 2015 at 6:08 PM, Rafael Cintron >>> wrote: >>> > I am good with this. I wish we had done it sooner as it would have >>> > saved me >>> > from writing a bunch of (now) unnecessary code. >>> > >>> > >>> > >>> > From: owners-public_webgl...@ >>> > [mailto:owners-public_webgl...@] On Behalf Of Kenneth Russell >>> > Sent: Monday, November 2, 2015 5:03 PM >>> > To: Jeff Gilbert >>> > Cc: webgl, public >>> > Subject: Re: [Public WebGL] Out-of-bounds ReadPixels and CopyTex*Image* >>> > behavior >>> > >>> > >>> > >>> > Thanks for proposing this and sorry for the delay reviewing it. >>> > >>> > >>> > >>> > This change sounds good to me. It's hard to imagine that applications >>> > are >>> > relying on the behavior of returning zero for out-of-bounds pixels >>> > during >>> > reads. Changing this for both WebGL 1.0 and 2.0 at the same time sounds >>> > fine >>> > to me; no reason to make the specs diverge further. >>> > >>> > >>> > >>> > Any other feedback from implementers? There aren't that many conformance >>> > tests for this behavior, so it should be straightforward to update the >>> > spec >>> > and those tests, and remove the invalidated tests from earlier versions >>> > of >>> > the conformance suite. >>> > >>> > >>> > >>> > Assuming no objections, would you be willing to assemble a pull request >>> > for >>> > both the spec and conformance test changes? >>> > >>> > >>> > >>> > Thanks, >>> > >>> > >>> > >>> > -Ken >>> > >>> > >>> > >>> > >>> > >>> > On Fri, Oct 30, 2015 at 6:03 AM, Jeff Gilbert >>> > wrote: >>> > >>> > >>> > We standardized this to read zeros in WebGL 1. However, this is >>> > trickier in WebGL 2 because of PBOs and the new PACK_ pixelstore >>> > options. >>> > >>> > I propose that we change this (at least for WebGL 2) to "Out-of-bounds >>> > pixels are not written to the destination during reads from a >>> > framebuffer (ReadPixels or CopyTex*Image*), leaving the values in the >>> > destination buffer unchanged. Partially-out-of-bounds reads will only >>> > write in-bounds pixels to the destination buffer." >>> > >>> > This should be at easy or easier to implement, and be much more >>> > performant, since implementations can just restrict the size of their >>> > read and draw rects for these operations. >>> > >>> > I would really rather make out-of-bounds reads of this sort an >>> > INVALID_OPERATION, but a change to an error is more likely to be >>> > breaking in terms of existing content. While it's also a breaking >>> > change from OpenGL, I don't believe it is a porting concern, since >>> > porting can be fixed by changing its behavior to match what I outline >>> > above at the Emscripten (or other) level, though. >>> > >>> > ----------------------------------------------------------- >>> > You are currently subscribed to public_webgl...@ >>> > To unsubscribe, send an email to majordomo...@ with >>> > the following command in the body of your email: >>> > unsubscribe public_webgl >>> > ----------------------------------------------------------- >>> > >>> > >>> >>> ----------------------------------------------------------- >>> You are currently subscribed to public_webgl...@ >>> To unsubscribe, send an email to majordomo...@ with >>> the following command in the body of your email: >>> unsubscribe public_webgl >>> ----------------------------------------------------------- >>> >> > > ----------------------------------------------------------- > You are currently subscribed to public_webgl...@ > To unsubscribe, send an email to majordomo...@ with > the following command in the body of your email: > unsubscribe public_webgl > ----------------------------------------------------------- > ----------------------------------------------------------- You are currently subscribed to public_webgl...@ To unsubscribe, send an email to majordomo...@ with the following command in the body of your email: unsubscribe public_webgl -----------------------------------------------------------