On 29.03.2017 01:09, Samuel Pitoiset wrote:
diff --git
a/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
b/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
new file mode 100644
index 000000000..dd865b22f
--- /dev/null
+++ b/tests/spec/arb_bindless_texture/compiler/images/indexing.vert
@@ -0,0 +1,30 @@
+// [config]
+// expect_result: pass
+// glsl_version: 3.30
+// require_extensions: GL_ARB_bindless_texture
GL_ARB_shader_image_load_store
+// [end config]
+
+#version 330
+#extension GL_ARB_bindless_texture: require
+#extension GL_ARB_shader_image_load_store: enable
+
+// The ARB_bindless_texture spec says:
+//
+// "Replace Section 4.1.X, (Images)"
+//
+// "Images may be aggregated into arrays within a shader (using square
+// brackets []) and can be indexed with general integer expressions."
+
+uniform writeonly image2D imgs[64];
+uniform uint a, b;
+
+void main()
+{
+ writeonly image2D img;
+ uint idx = 42u;
+
+ img = imgs[42];
+ img = imgs[idx];
+ img = imgs[idx + idx];
This is an out of bounds access. Should this fail compilation?
Mmmh, good question. I would say yes. The test works with the NVIDIA
blob, but I will update.
This kind of thing shouldn't generate an error -- maybe a warning. Makes
sense to update it anyway.
Cheers,
Nicolai
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit