Use line number information from entire function expression
[mesa.git] / src / glsl / ir_uniform.h
index 30e6f260d75eec9b72c1311d5d9c687d2fc112d3..13faab7c0a14d460b839ef07946ec0d1b84a7541 100644 (file)
@@ -99,15 +99,24 @@ struct gl_uniform_storage {
     */
    bool initialized;
 
-   /**
-    * Base sampler index
-    *
-    * If \c ::base_type is \c GLSL_TYPE_SAMPLER, this represents the index of
-    * this sampler.  If \c ::array_elements is not zero, the array will use
-    * sampler indexes \c ::sampler through \c ::sampler + \c ::array_elements
-    * - 1, inclusive.
-    */
-   uint8_t sampler;
+   struct {
+      /**
+       * Base sampler index
+       *
+       * If \c ::base_type is \c GLSL_TYPE_SAMPLER, this represents the index
+       * of this sampler.  If \c ::array_elements is not zero, the array will
+       * use sampler indices \c ::sampler through \c ::sampler +
+       * \c ::array_elements - 1, inclusive.
+       *
+       * Note that the index may be different in each shader stage.
+       */
+      uint8_t index;
+
+      /**
+       * Whether this sampler is used in this shader stage.
+       */
+      bool active;
+   } sampler[MESA_SHADER_TYPES];
 
    /**
     * Storage used by the driver for the uniform
@@ -157,6 +166,13 @@ struct gl_uniform_storage {
    bool row_major;
 
    /** @} */
+
+   /**
+    * Index within gl_shader_program::AtomicBuffers[] of the atomic
+    * counter buffer this uniform is stored in, or -1 if this is not
+    * an atomic counter.
+    */
+   int atomic_buffer_index;
 };
 
 #ifdef __cplusplus