[Piglit] [PATCH 3/3] arb_shader_image_load_store: call glMemoryBarrier() before reading an image written to by imageStore()

Timothy Arceri timothy.arceri at collabora.com
Wed Dec 9 15:36:52 PST 2015


I haven't been able to test if this fixes the bug as I cannot reproduce it.

Cc: Francisco Jerez <currojerez at riseup.net>
Cc: Jordan Justen <jordan.l.justen at intel.com>
https://bugs.freedesktop.org/show_bug.cgi?id=92822
---
 .../image_store/basic-imageStore-const-uniform-index.shader_test      | 2 ++
 .../basic-imageStore-mixed-const-non-const-uniform-index.shader_test  | 2 ++
 .../basic-imageStore-mixed-const-non-const-uniform-index2.shader_test | 2 ++
 .../image_store/basic-imageStore-non-const-uniform-index.shader_test  | 4 ++++
 .../execution/basic-imageStore-from-uniform.shader_test               | 2 ++
 5 files changed, 12 insertions(+)

diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test
index af7d5d4..ed34b39 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-const-uniform-index.shader_test
@@ -45,6 +45,7 @@ fb tex 2d 1
 draw rect -1 -1 2 2
 
 # Test the result of imageStore
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 1.0 0.0 0.0 1.0
 
@@ -54,5 +55,6 @@ fb tex 2d 1
 draw rect -1 -1 2 2
 
 # Test the result of imageStore
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index.shader_test
index 519ae0b..ebaeb5d 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index.shader_test
@@ -52,6 +52,7 @@ fb tex 2d 2
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 0
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 1.0 0.0 0.0 1.0
 
@@ -62,5 +63,6 @@ fb tex 2d 2
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 1
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 1
 probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index2.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index2.shader_test
index 1d33d3f..6bd1467 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index2.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-mixed-const-non-const-uniform-index2.shader_test
@@ -52,6 +52,7 @@ fb tex 2d 2
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 0
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 1.0 0.0 0.0 1.0
 
@@ -62,5 +63,6 @@ fb tex 2d 2
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 1
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 1
 probe all rgba 0.0 1.0 0.0 1.0
diff --git a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test
index 646ea3b..62f9861 100644
--- a/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test
+++ b/tests/spec/arb_arrays_of_arrays/execution/image_store/basic-imageStore-non-const-uniform-index.shader_test
@@ -64,6 +64,7 @@ fb tex 2d 4
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 0
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 1.0 0.0 0.0 1.0
 
@@ -75,6 +76,7 @@ fb tex 2d 4
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 1
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 1
 probe all rgba 0.0 1.0 0.0 1.0
 
@@ -86,6 +88,7 @@ fb tex 2d 4
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 2
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 2
 probe all rgba 0.0 0.0 1.0 1.0
 
@@ -97,5 +100,6 @@ fb tex 2d 4
 draw rect -1 -1 2 2
 
 # Test the result of imageStore 3
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 3
 probe all rgba 0.0 1.0 1.0 1.0
diff --git a/tests/spec/arb_shader_image_load_store/execution/basic-imageStore-from-uniform.shader_test b/tests/spec/arb_shader_image_load_store/execution/basic-imageStore-from-uniform.shader_test
index 7133593..f3e1084 100644
--- a/tests/spec/arb_shader_image_load_store/execution/basic-imageStore-from-uniform.shader_test
+++ b/tests/spec/arb_shader_image_load_store/execution/basic-imageStore-from-uniform.shader_test
@@ -43,6 +43,7 @@ fb tex 2d 1
 draw rect -1 -1 2 2
 
 # Test the result of imageStore
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 1.0 0.0 0.0 1.0
 
@@ -52,5 +53,6 @@ fb tex 2d 1
 draw rect -1 -1 2 2
 
 # Test the result of imageStore
+memory barrier GL_FRAMEBUFFER_BARRIER_BIT
 fb tex 2d 0
 probe all rgba 0.0 1.0 0.0 1.0
-- 
2.4.3



More information about the Piglit mailing list