[Mesa-dev] [RFC PATCH 14/26] glsl: do not make bindless image read-only variables

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Apr 11 16:48:25 UTC 2017


Bindless images can be explicitely converted to and from uvec2
using scalar constructors.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/compiler/glsl/ast_to_hir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index f52ba8181a..bcdf212497 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -3411,7 +3411,7 @@ apply_image_qualifier_to_variable(const struct ast_type_qualifier *qual,
       var->data.image_coherent |= qual->flags.q.coherent;
       var->data.image_volatile |= qual->flags.q._volatile;
       var->data.image_restrict |= qual->flags.q.restrict_flag;
-      var->data.read_only = true;
+      var->data.read_only = base_type->is_image();
 
       if (qual->flags.q.explicit_image_format) {
          if (var->data.mode == ir_var_function_in) {
-- 
2.12.2



More information about the mesa-dev mailing list