From 0c0bfb2ead03789164cee364fbf405994d876ca3 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 27 Oct 2014 16:34:06 -0700 Subject: glsl: Add infrastructure for "hidden" uniforms. In the compiler, we'd like to generate implicit uniforms for internal use. These should not be visible via the GL uniform introspection API. To support that, we add a new ir_variable::how_declared value of ir_var_hidden, and plumb that through to gl_uniform_storage. v2 (idr): Fix some memory management issues in move_hidden_uniforms_to_end. The comment block on the function has more details. Signed-off-by: Kenneth Graunke Signed-off-by: Ian Romanick --- src/glsl/ir.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/glsl/ir.h') diff --git a/src/glsl/ir.h b/src/glsl/ir.h index 5c7faf6..a0f48b2 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -342,6 +342,12 @@ enum ir_var_declaration_type { * re-declared by the shader. */ ir_var_declared_implicitly, + + /** + * Variable is implicitly generated by the compiler and should not be + * visible via the API. + */ + ir_var_hidden, }; /** -- cgit v1.1