aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/linker.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-06-18 08:28:35 +0200
committermarha <marha@users.sourceforge.net>2013-06-18 08:28:35 +0200
commit230fe896faed312ef22d915e871fb5aee3ecfad0 (patch)
tree971b0c0899c72496f97970319bfadfae383abbea /mesalib/src/glsl/linker.cpp
parent180290f941da61bd80284d817e27c01cf789ee53 (diff)
parentb071050b9eda9d5e5185e582dbe9f4adba863ccc (diff)
downloadvcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.tar.gz
vcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.tar.bz2
vcxsrv-230fe896faed312ef22d915e871fb5aee3ecfad0.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libX11 libXmu libxcb/xcb-proto mesa mkfontscale pixman xkeyboard-config git update 18 June 2013
Diffstat (limited to 'mesalib/src/glsl/linker.cpp')
-rw-r--r--mesalib/src/glsl/linker.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp
index 982fe46bd..cd8d680ae 100644
--- a/mesalib/src/glsl/linker.cpp
+++ b/mesalib/src/glsl/linker.cpp
@@ -1523,12 +1523,18 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
ctx->Const.GeometryProgram.MaxTextureImageUnits
};
- const unsigned max_uniform_components[MESA_SHADER_TYPES] = {
+ const unsigned max_default_uniform_components[MESA_SHADER_TYPES] = {
ctx->Const.VertexProgram.MaxUniformComponents,
ctx->Const.FragmentProgram.MaxUniformComponents,
ctx->Const.GeometryProgram.MaxUniformComponents
};
+ const unsigned max_combined_uniform_components[MESA_SHADER_TYPES] = {
+ ctx->Const.VertexProgram.MaxCombinedUniformComponents,
+ ctx->Const.FragmentProgram.MaxCombinedUniformComponents,
+ ctx->Const.GeometryProgram.MaxCombinedUniformComponents
+ };
+
const unsigned max_uniform_blocks[MESA_SHADER_TYPES] = {
ctx->Const.VertexProgram.MaxUniformBlocks,
ctx->Const.FragmentProgram.MaxUniformBlocks,
@@ -1546,7 +1552,22 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
shader_names[i]);
}
- if (sh->num_uniform_components > max_uniform_components[i]) {
+ if (sh->num_uniform_components > max_default_uniform_components[i]) {
+ if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) {
+ linker_warning(prog, "Too many %s shader default uniform block "
+ "components, but the driver will try to optimize "
+ "them out; this is non-portable out-of-spec "
+ "behavior\n",
+ shader_names[i]);
+ } else {
+ linker_error(prog, "Too many %s shader default uniform block "
+ "components",
+ shader_names[i]);
+ }
+ }
+
+ if (sh->num_combined_uniform_components >
+ max_combined_uniform_components[i]) {
if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) {
linker_warning(prog, "Too many %s shader uniform components, "
"but the driver will try to optimize them out; "