diff options
author | Paul Berry <stereotype441@gmail.com> | 2011-07-11 09:36:54 -0700 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2011-07-18 10:59:53 -0700 |
commit | a39f21324103b59c7485b61d8f6a639010a8220f (patch) | |
tree | 315ceda4fd821ab43e75f185c065c3696416361a /tests/all.tests | |
parent | af0ced30461f5f9e6c2b42025bf48b8a79a2da3a (diff) |
Test that shaders are not allowed to declare non-uniform samplers.
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.
Note: many of these tests were modelled after
tests/shaders/glsl-fs-uniform-sampler-struct.shader_test, and cover a
superset of the cases it covers, so I've deleted it.
Reviewed-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'tests/all.tests')
-rw-r--r-- | tests/all.tests | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/all.tests b/tests/all.tests index d72507ef0..6d837b82e 100644 --- a/tests/all.tests +++ b/tests/all.tests @@ -713,6 +713,10 @@ spec['glsl-1.10']['linker'] = Group() add_shader_test_dir(spec['glsl-1.10']['linker'], os.path.join(os.path.dirname(__file__), 'spec', 'glsl-1.10', 'linker'), recursive=True) +spec['glsl-1.10']['execution'] = Group() +add_shader_test_dir(spec['glsl-1.10']['execution'], + os.path.join(os.path.dirname(__file__), 'spec', 'glsl-1.10', 'execution'), + recursive=True) # Group spec/glsl-1.20 spec['glsl-1.20'] = Group() |