[Mesa-dev] [PATCH v2] glsl: Add is_unsized_array flag to gl_uniform_storage

Samuel Iglesias Gonsalvez siglesias at igalia.com
Tue Oct 6 01:08:40 PDT 2015


v2:
- Fix uniform's is_unsized_array flag assignment

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
---
 src/glsl/ir_uniform.h      | 5 +++++
 src/glsl/link_uniforms.cpp | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
index 50fe76b..367de7d 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -195,6 +195,11 @@ struct gl_uniform_storage {
     * This is a shader storage buffer variable, not an uniform.
     */
    bool is_shader_storage;
+
+   /**
+    * Flag to indicate the variable is an unsized array
+    */
+   bool is_unsized_array;
 };
 
 #ifdef __cplusplus
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 0642ddc..ae6c40c 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -787,6 +787,8 @@ private:
 
       this->uniforms[id].is_shader_storage =
          current_var->is_in_shader_storage_block();
+      this->uniforms[id].is_unsized_array =
+         type->is_unsized_array();
 
       if (this->ubo_block_index != -1) {
          this->uniforms[id].block_index = this->ubo_block_index;
-- 
2.1.4



More information about the mesa-dev mailing list