[Piglit] Ideas for testing ARB_shader_group_vote?

Ian Romanick idr at freedesktop.org
Wed Jan 13 18:01:17 PST 2016


On 01/13/2016 02:23 PM, Matt Turner wrote:
> I think I've finished the implementation of ARB_shader_group_vote [1]

\o/

> for i965/fs [2], but I haven't come up with any ideas for testing it.
> 
> Please give me some ideas. :)

You could start with a couple simple sanity tests:

- Render a suitably aligned quad where every fragment reads a solid
color texture.  The result of the texture lookup is used for the vote
condition.  Something like allInvocationsARB(color == expected_color)
should be true.  A variation would read from the same location two
identical textures in each fragment.  allInvocationsARB(color1 ==
color2) should be true.

- Render a suitably aligned quad where every fragment reads from two
different textures that have no corresponding texels with the same
color.  allInvocationsARB(color1 == color2) and anyInvocationARB(color1
== color2) should be false.  allInvocationsEqualARB(color1 == color2)
should be true.

I think the really hard part of testing this extension is testing:

    In groups where some invocations do not execute the function call,
    the value returned by the function is not affected by any
    invocation not calling the function, even when <value> is
    well-defined for that invocation.

Maybe do the above tests but have half the fragments (in a checkerboard
pattern) either discard() or use flow-control to avoid the calls to
allInvocationsARB, etc.  In the fragments that avoid the calls, be sure
to munge the values so that, were the calls made, they would give the
"wrong" answer.

> [1] https://www.opengl.org/registry/specs/ARB/shader_group_vote.txt
> [2] git://people.freedesktop.org/~mattst88/mesa arb_shader_group_vote
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit



More information about the Piglit mailing list