diff options
Diffstat (limited to 'src/glsl/ir_uniform.h')
-rw-r--r-- | src/glsl/ir_uniform.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h index 30e6f260d75..8198c481983 100644 --- a/src/glsl/ir_uniform.h +++ b/src/glsl/ir_uniform.h @@ -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 |