[Piglit] [PATCH] fs-texelFetchOffset-2D: don't assume undefined values to be solid black
sroland at vmware.com
Tue Nov 27 14:00:14 PST 2012
Am 27.11.2012 22:36, schrieb Eric Anholt:
> 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.
I think you're probably right. Since it states "results are undefined"
rather than "behavior is undefined" or something like that program
termination probably isn't an option. So ARB_robustness doesn't change
things at all, only ARB_robust_buffer_access_behavior does.
> 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.
More information about the Piglit