[Piglit] [PATCH] fs-texelFetchOffset-2D: don't assume undefined values to be solid black
sroland at vmware.com
Tue Nov 27 07:36:23 PST 2012
Am 27.11.2012 08:25, 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.)
> Are you saying texelFetch is supposed to not do wrap modes?
Yes. From the OpenGL specification 4.3 compatibility profile, page 387
(in a section you'd never find it..., subsection 220.127.116.11 Texel Fetches).
FWIW the DX10 equivalent (ld opcode) doesn't even have any sampler state
(and hence clamping behavior) associated with it.
More information about the Piglit