glsl: add top level array size and stride to gl_uniform_storage
[mesa.git] / src / glsl / ir_uniform.h
index 50fe76b7ea28fbd6fee39653a6722b1bf61fbe6c..1854279925bf4ff8aea55a6ad6bcba3a643fc96a 100644 (file)
@@ -161,6 +161,22 @@ struct gl_uniform_storage {
 
    /** @} */
 
+   /**
+    * This is a compiler-generated uniform that should not be advertised
+    * via the API.
+    */
+   bool hidden;
+
+   /**
+    * This is a built-in uniform that should not be modified through any gl API.
+    */
+   bool builtin;
+
+   /**
+    * This is a shader storage buffer variable, not an uniform.
+    */
+   bool is_shader_storage;
+
    /**
     * Index within gl_shader_program::AtomicBuffers[] of the atomic
     * counter buffer this uniform is stored in, or -1 if this is not
@@ -181,20 +197,16 @@ struct gl_uniform_storage {
    unsigned num_compatible_subroutines;
 
    /**
-    * This is a compiler-generated uniform that should not be advertised
-    * via the API.
+    * A single integer identifying the number of active array elements of
+    * the top-level shader storage block member (GL_TOP_LEVEL_ARRAY_SIZE).
     */
-   bool hidden;
+   unsigned top_level_array_size;
 
    /**
-    * This is a built-in uniform that should not be modified through any gl API.
+    * A single integer identifying the stride between array elements of the
+    * top-level shader storage block member. (GL_TOP_LEVEL_ARRAY_STRIDE).
     */
-   bool builtin;
-
-   /**
-    * This is a shader storage buffer variable, not an uniform.
-    */
-   bool is_shader_storage;
+   unsigned top_level_array_stride;
 };
 
 #ifdef __cplusplus