summaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorMartin Peres <[email protected]>2015-05-21 15:51:09 +0300
committerMartin Peres <[email protected]>2015-06-04 09:25:00 +0300
commit87a4bc511811327a00f9bbc1b6870b7fa46675f7 (patch)
treec96c9d1eb9fe62a2ba0d40b62bbdd26f0614e7fe /src/glsl/linker.cpp
parent4fd42a7c2798d03476c84b79cb855984a15c222c (diff)
mesa: reference built-in uniforms into gl_uniform_storage
This change introduces a new field in gl_uniform_storage to explicitely say that a uniform is built-in. In the case where it is, no storage is defined to make it clear that it is read-only from the mesa side. I fixed all the places in the code that made use of the structure that I changed. Any place making a wrong assumption and using the storage straight away will just crash. This patch seems to implement the path of least resistance towards listing built-in uniforms in GL_ACTIVE_UNIFORM (and other APIs). Reviewed-by: Tapani Pälli <[email protected]> Signed-off-by: Martin Peres <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 99e0a388bb4..99783800b7f 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1400,8 +1400,8 @@ link_fs_input_layout_qualifiers(struct gl_shader_program *prog,
"layout qualifiers for gl_FragCoord\n");
}
- /* Update the linked shader state.  Note that uses_gl_fragcoord should
- * accumulate the results.  The other values should replace.  If there
+ /* Update the linked shader state. Note that uses_gl_fragcoord should
+ * accumulate the results. The other values should replace. If there
* are multiple redeclarations, all the fields except uses_gl_fragcoord
* are already known to be the same.
*/
@@ -2693,7 +2693,7 @@ build_program_resource_list(struct gl_context *ctx,
}
/* Add uniforms from uniform storage. */
- for (unsigned i = 0; i < shProg->NumUserUniformStorage; i++) {
+ for (unsigned i = 0; i < shProg->NumUniformStorage; i++) {
/* Do not add uniforms internally used by Mesa. */
if (shProg->UniformStorage[i].hidden)
continue;