[Piglit] [PATCH] fs-texelFetchOffset-2D: don't assume undefined values to be solid black
eric at anholt.net
Tue Nov 27 13:36:23 PST 2012
sroland at vmware.com writes:
> From: Roland Scheidegger <sroland at vmware.com>
> core GL specifies out-of-bound accesses have undefined behavior,
> which includes crashes.
> Crashes are very much undesired, but ARB_robustness still allows undefined
> values to be returned (with a recommendation to return 0).
> Only ARB_robust_buffer_access_behavior would require to return zero, but the
> test doesn't need this extension. In any case even returning zero is not what
> the test expected, since it wanted [0,0,0,1].
> (With this change softpipe passes the test, as it clamps the coords.)
OK, I was confused by this change beacuse of all the talk about
robustness - I was pretty sure that GL's "undefined" meant "undefined
but not program termination" since there are a bunch of cases like
mapbuffer that explicitly allow termination for undefined, and
ARB_robustness only talks about removing termination for VBOs. Now, I
see a few cases where GL 3.0 says undefined but *not* termination, like
infs and nans, so I'm not so sure whether termination is allowed for
undefined texel fetches in the absence of robustness.
Either way, I think this change would be clarified by citing the spec
for fetches outside of the surface instead of all the talk about
robustness, and at least renaming black to undefined.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Piglit