aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/uniform_query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/uniform_query.cpp')
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index 5f1af0873..480bc6f16 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -253,6 +253,21 @@ validate_uniform_parameters(struct gl_context *ctx,
return false;
}
+ /* If the driver storage pointer in remap table is -1, we ignore silently.
+ *
+ * GL_ARB_explicit_uniform_location spec says:
+ * "What happens if Uniform* is called with an explicitly defined
+ * uniform location, but that uniform is deemed inactive by the
+ * linker?
+ *
+ * RESOLVED: The call is ignored for inactive uniform variables and
+ * no error is generated."
+ *
+ */
+ if (shProg->UniformRemapTable[location] ==
+ INACTIVE_UNIFORM_EXPLICIT_LOCATION)
+ return false;
+
_mesa_uniform_split_location_offset(shProg, location, loc, array_index);
if (shProg->UniformStorage[*loc].array_elements == 0 && count > 1) {