[Piglit] [PATCH 2/2] Test that shaders are not allowed to declare non-uniform samplers.
eric at anholt.net
Wed Jul 13 17:45:10 PDT 2011
On Wed, 13 Jul 2011 15:28:33 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> These tests check conformance with page 17 (page 23 of the PDF) of the
> GLSL 1.20 spec:
> "[Samplers] can only be declared as function parameters or
> uniform variables (see Section 4.3.5 "Uniform"). ... [Samplers]
> cannot be used as out or inout function parameters"
> The GLSL 1.10 spec has a similar restriction which omits mention of
> "out" and "inout" function parameters, however it's clear from context
> that the 1.10 spec was not intended to be more permissive; it was
> simply not stated as clearly. Accordingly, I've placed the tests in
> the glsl-1.10 directory.
> 8 of the new tests are "compiler" tests, which verify that shaders are
> rejected when they include a sampler in a toplevel non-uniform
> declaration, or in a function paramter that is "out" or "inout". The
> remaining 4 tests are "execution" tests, which verify that samplers
> work properly when declared as uniforms or "in" function parameters.
The tests are:
Reviewed-by: Eric Anholt <eric at anholt.net>
I'd say go ahead and remove glsl-fs-uniform-sampler-struct, since this
seems to be a more complete set of that basic idea. I see no equivalent
for glsl-fs-uniform-sampler-array, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Piglit