diff options
author | Tapani Pälli <tapani.palli@intel.com> | 2023-02-09 07:56:56 +0200 |
---|---|---|
committer | Tapani Pälli <tapani.palli@intel.com> | 2023-02-13 09:58:22 +0200 |
commit | a318a09f6e44aec72bc35cde9cc5dafbd012f686 (patch) | |
tree | 25e6be9b4c56f72a2c7b4821e7b51fcf036ae91e | |
parent | 590d81bb5fa219353104980108e9f1aa2b1d1b6b (diff) |
glsl-1.10: add a new preprocessor test for unary op
Tests a condition where a define has minus in it and we want to
utilize -define value in assignment.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/770>
-rw-r--r-- | tests/spec/glsl-1.10/preprocessor/unary-op-minus-define.shader_test | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.10/preprocessor/unary-op-minus-define.shader_test b/tests/spec/glsl-1.10/preprocessor/unary-op-minus-define.shader_test new file mode 100644 index 000000000..966e55626 --- /dev/null +++ b/tests/spec/glsl-1.10/preprocessor/unary-op-minus-define.shader_test @@ -0,0 +1,19 @@ +[require] +GLSL >= 1.10 + +[vertex shader passthrough] + +[fragment shader] +#version 110 + +#define VALUE -1.0 +const float x = -VALUE; + +void main() +{ + gl_FragColor = vec4(0.0, x, 0.0, 1.0); +} + +[test] +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 |