summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-10-18 11:53:19 -0700
committerIan Romanick <[email protected]>2011-11-07 13:33:16 -0800
commit9a21d4670ce88cd2476930f3c5f7945cc57579e8 (patch)
tree46b4b370962b24266f8524be84527c4fd315fb82
parent466d5ffee4a370ba9d031c7bd685ed5d005479e9 (diff)
mesa: Add structures for "new style" uniform tracking in shader programs
Signed-off-by: Ian Romanick <[email protected]> Tested-by: Tom Stellard <[email protected]>
-rw-r--r--src/mesa/main/mtypes.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 61909727d16..013524a84d9 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -77,6 +77,7 @@ struct gl_program_cache;
struct gl_texture_object;
struct gl_context;
struct st_context;
+struct gl_uniform_storage;
/*@}*/
@@ -2205,6 +2206,30 @@ struct gl_shader_program
} Vert;
/* post-link info: */
+ unsigned NumUserUniformStorage;
+ struct gl_uniform_storage *UniformStorage;
+
+ /**
+ * Map of active uniform names to locations
+ *
+ * Maps any active uniform that is not an array element to a location.
+ * Each active uniform, including individual structure members will appear
+ * in this map. This roughly corresponds to the set of names that would be
+ * enumerated by \c glGetActiveUniform.
+ */
+ struct string_to_uint_map *UniformHash;
+
+ /**
+ * Map from sampler unit to texture unit (set by glUniform1i())
+ *
+ * A sampler unit is associated with each sampler uniform by the linker.
+ * The sampler unit associated with each uniform is stored in the
+ * \c gl_uniform_storage::sampler field.
+ */
+ GLubyte SamplerUnits[MAX_SAMPLERS];
+ /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
+ gl_texture_index SamplerTargets[MAX_SAMPLERS];
+
struct gl_uniform_list *Uniforms;
struct gl_program_parameter_list *Varying;
GLboolean LinkStatus; /**< GL_LINK_STATUS */