[Mesa-dev] [PATCH] glsl: add image_format check in cross_validate_globals()

Lofstedt, Marta marta.lofstedt at intel.com
Tue Jan 5 05:52:52 PST 2016


Thanks Samuel,

I confirm that your patch fixes the testcase for both BDW and SKL.

/Marta
________________________________________
From: Samuel Iglesias Gonsálvez [siglesias at igalia.com]
Sent: Tuesday, January 05, 2016 2:32 PM
To: mesa-dev at lists.freedesktop.org
Cc: Lofstedt, Marta; Samuel Iglesias Gonsálvez
Subject: [PATCH] glsl: add image_format check in cross_validate_globals()

Fixes CTS test:

ES31-CTS.shader_image_load_store.negative-linkErrors

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93410

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
---
 src/glsl/linker.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index a6e81b4..cf4d68d 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1133,6 +1133,12 @@ cross_validate_globals(struct gl_shader_program *prog,
                             mode_string(var), var->name);
                return;
             }
+            if (existing->data.image_format != var->data.image_format) {
+               linker_error(prog, "declarations for %s `%s` have "
+                            "mismatching image format qualifiers\n",
+                            mode_string(var), var->name);
+               return;
+            }
         } else
            variables.add_variable(var);
       }
--
2.5.0



More information about the mesa-dev mailing list