[Piglit] [PATCH] texture-integer: use usampler/uint value

Ilia Mirkin imirkin at alum.mit.edu
Mon Nov 23 13:34:25 PST 2015


On Mon, Nov 23, 2015 at 4:17 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 11/20/2015 09:24 PM, Ilia Mirkin wrote:
>> All of the random values are positive. Mixing uint texture with isampler
>> is not allowed, and happens to cause problems for freedreno. Using uint
>> works.
>
> I guess I'm confused what the actual problem is.  The test previously
> used isampler with ivec4.  Did that work with freedreno?

Nope, that's why I'm changing it :)

>  Is the UINT
> vs. INT base type of the texture the problem?

Yes, it appears so. Adreno a3xx/a4xx has instructions like

sam (u32)result, coords
sam (s32)result, coords

And it *actually* converts. For example if you have an int texture
format, and do

sam (f32)result, coords

then the result will contain floatified integers. All this leads to it
being really sensitive to mismatches between sampler type in the
shader and the declared texture format. My recollection is that such
mismatches result in undefined behavior, so what the hardware is doing
is "OK". Except then the tests fail.

A proper fix would optionally use an int or uint sampler, but... meh.

>
> In other news... piglit's coverage of integer samplers is *pathetic*.
> I grepped for all uses of isampler or usampler.  The second grep just
> filters out the compiler tests.

And almost none that test rendering.

  -ilia


More information about the Piglit mailing list