summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_uniform.h
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2015-10-13 14:17:49 +0300
committerTapani Pälli <tapani.palli@intel.com>2015-10-14 09:32:58 +0300
commitb76159b09617a07b9e3d53d64d31d4835702827f (patch)
tree120a57d756a99141c024a31e4bed99c983b0b094 /src/glsl/ir_uniform.h
parentd3f45888045c84b2bc382a34d169a0ede4774a24 (diff)
downloadexternal_mesa3d-b76159b09617a07b9e3d53d64d31d4835702827f.zip
external_mesa3d-b76159b09617a07b9e3d53d64d31d4835702827f.tar.gz
external_mesa3d-b76159b09617a07b9e3d53d64d31d4835702827f.tar.bz2
glsl: add top level array size and stride to gl_uniform_storage
Patch adds 2 new fields to gl_uniform_storage so that we don't need to calculate these values during runtime shader queries. This is required by upcoming changes to free GLSL IR after linking. Patch moves 3 booleans inside structure so that structure size stays the same after this change. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Diffstat (limited to 'src/glsl/ir_uniform.h')
-rw-r--r--src/glsl/ir_uniform.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/glsl/ir_uniform.h b/src/glsl/ir_uniform.h
index 50fe76b..1854279 100644
--- a/src/glsl/ir_uniform.h
+++ b/src/glsl/ir_uniform.h
@@ -162,6 +162,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
* an atomic counter.
@@ -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