Can you please reference the spec as much as possible? See other ARB_bindless_texture if you need an example.

More comments below.

On 04/10/2018 12:32 PM, Karol Herbst wrote:
currently fails in mesa with:
ir_dereference_variable @ 0x1446830 specifies undeclared variable `wrongHandle' 
@ 0xffd1b0

Signed-off-by: Karol Herbst <kher...@redhat.com>
---
  ...rithmetic-func-call-uvec2-texture2D.shader_test | 37 ++++++++++++++++++++++
  1 file changed, 37 insertions(+)
  create mode 100644 
tests/spec/arb_bindless_texture/execution/samplers/basic-arithmetic-func-call-uvec2-texture2D.shader_test

diff --git 
a/tests/spec/arb_bindless_texture/execution/samplers/basic-arithmetic-func-call-uvec2-texture2D.shader_test
 
b/tests/spec/arb_bindless_texture/execution/samplers/basic-arithmetic-func-call-uvec2-texture2D.shader_test
new file mode 100644
index 000000000..fd488c7cd
--- /dev/null
+++ 
b/tests/spec/arb_bindless_texture/execution/samplers/basic-arithmetic-func-call-uvec2-texture2D.shader_test
@@ -0,0 +1,37 @@
+# Same as basic-texture2D.shader_test, but with some math on the handle
+[require]
+GL >= 3.3
+GLSL >= 3.30
+GL_ARB_bindless_texture
+
+[vertex shader passthrough]
+
+[fragment shader]
+#version 330
+#extension GL_ARB_bindless_texture: require
+
+layout (bindless_sampler) uniform sampler2D tex;
+uniform uvec2 handleOffset;
+
+out vec4 finalColor;
+
+sampler2D adjustSamplerHandle(sampler2D wrongHandle)

Isn't required to use the "in" qualifier here?

Also, this is a compiler test, so you don't need to write a .shader_test and you should put it in tests/spec/arb_bindless_texture/compiler

Same comments apply to "arb_bindless_texture: add test for conversion of bounded sampler2D to uvec2".

+{
+       uvec2 handle = uvec2(wrongHandle);
+       handle.x -= 0x12345678u;
+       handle.y -= 0x9abcdef0u;
+       return sampler2D(handle + handleOffset);
+}
+
+void main()
+{
+       finalColor = texture2D(adjustSamplerHandle(tex), vec2(0, 0));
+}
+
+[test]
+texture rgbw 0 (16, 16)
+resident texture 0
+uniform uvec2 handleOffset 0x12345678 0x9abcdef0
+uniform handle tex 0
+draw rect -1 -1 2 2
+relative probe rgb (0.0, 0.0) (1.0, 0.0, 0.0)

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to