Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> --- .../uniform-after-restore.shader_test | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/spec/arb_get_program_binary/execution/uniform-after-restore.shader_test
diff --git a/tests/spec/arb_get_program_binary/execution/uniform-after-restore.shader_test b/tests/spec/arb_get_program_binary/execution/uniform-after-restore.shader_test new file mode 100644 index 000000000..5b18c04c2 --- /dev/null +++ b/tests/spec/arb_get_program_binary/execution/uniform-after-restore.shader_test @@ -0,0 +1,35 @@ +# From the ARB_get_program_binary extension spec: +# +# "A successful call to ProgramBinary will reset all uniform variables +# to their initial values. The initial value is either the value of +# the variable's initializer as specified in the original shader +# source, or 0 if no initializer was present." +# + +[require] +GLSL >= 1.20 +GL_NUM_PROGRAM_BINARY_FORMATS >= 1 + +[vertex shader] +void main() +{ + gl_Position = gl_Vertex; +} + +[fragment shader] +#version 120 + +uniform vec4 color = vec4(0.0, 1.0, 0.0, 1.0); +void main() +{ + gl_FragColor = color; +} + +[test] +uniform vec4 color 1.0 0.0 1.0 0.0 +draw rect -1 -1 2 2 +probe all rgba 1.0 0.0 1.0 0.0 +uniform vec4 color 1.0 0.0 1.0 0.0 +program binary save restore +draw rect -1 -1 2 2 +probe all rgba 0.0 1.0 0.0 1.0 -- 2.17.1 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit