summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_uniform.h
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2014-03-06 11:00:17 +0200
committerTapani Pälli <[email protected]>2014-03-10 09:46:24 +0200
commit56b1be4399d76c0fe5ddf099a7ac5b45ab58e8cf (patch)
tree0ee265183905dec2e7c8d5679c5014e07f1bdb21 /src/glsl/ir_uniform.h
parentaa0d95a08dbf8f0e3ed66b624ccbc60753b61ef1 (diff)
mesa/glsl: introduce a remap table for uniform locations
Patch adds a remap table for uniforms that is used to provide a mapping from application specified uniform location to actual location in the UniformStorage. Existing UniformLocationBaseScale usage is removed as table can be used to set sequential values for array uniform elements. This mapping helps to implement GL_ARB_explicit_uniform_location so that uniforms locations can be reorganized and handled in a more easy manner. v2: small fixes + rename parameters for merge and split functions (Ian) improve documentation, remove old check for location bounds (Eric) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/glsl/ir_uniform.h')
-rw-r--r--src/glsl/ir_uniform.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
index 7508f795d08..3508509d4d0 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -178,6 +178,12 @@ struct gl_uniform_storage {
* an atomic counter.
*/
int atomic_buffer_index;
+
+ /**
+ * The 'base location' for this uniform in the uniform remap table. For
+ * arrays this is the first element in the array.
+ */
+ unsigned remap_location;
};
#ifdef __cplusplus