Make sure it's allowed to pass a handle via the OpenGL API when the explicit binding qualifier is defined in the shader.
Signed-off-by: Samuel Pitoiset <[email protected]> --- .../execution/explicit-texture-binding.shader_test | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/spec/arb_bindless_texture/execution/explicit-texture-binding.shader_test diff --git a/tests/spec/arb_bindless_texture/execution/explicit-texture-binding.shader_test b/tests/spec/arb_bindless_texture/execution/explicit-texture-binding.shader_test new file mode 100644 index 000000000..07e55a127 --- /dev/null +++ b/tests/spec/arb_bindless_texture/execution/explicit-texture-binding.shader_test @@ -0,0 +1,28 @@ +# In this test, set a wrong binding texture unit directly in the shader and +# pass a texture handle through the OpenGL API. The test shouldn't fail if +# the sampler is considered bindless (64-bit handle). +[require] +GL >= 4.2 +GLSL >= 4.20 +GL_ARB_bindless_texture + +[vertex shader passthrough] + +[fragment shader] +#version 420 +#extension GL_ARB_bindless_texture: require + +layout (bindless_sampler, binding = 5) uniform sampler2D tex; +out vec4 finalColor; + +void main() +{ + finalColor = texture2D(tex, vec2(0, 0)); +} + +[test] +texture rgbw 0 (16, 16) +resident texture 0 +uniform handle tex 0 +draw rect -1 -1 2 2 +relative probe rgb (0.0, 0.0) (1.0, 0.0, 0.0) -- 2.12.2 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
