[Mesa-dev] [PATCH 3/6] glsl: Add is_unsized_array flag to gl_uniform_storage

Samuel Iglesias Gonsalvez siglesias at igalia.com
Fri Oct 2 00:13:53 PDT 2015


---
 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 858a7da..6954759 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -199,6 +199,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 47d49c8..c471d98 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -792,6 +792,8 @@ private:
 
       this->uniforms[id].is_shader_storage =
          current_var->is_in_shader_storage_block();
+      this->uniforms[id].is_unsized_array =
+         current_var->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