[Mesa-dev] [PATCH 17/17] glsl: fix checking against the max uniform limit with UBOs

Marek Olšák maraeo at gmail.com
Wed May 1 20:43:08 PDT 2013


MaxUniformComponents contains only the limit for the default uniform buffer,
but the linker also adds all uniforms blocks to the uniform usage stats,
causing bogus linker failures.

NOTE: This is a candidate for the 9.1 branch.
---
 src/glsl/linker.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 3ef5940..bfe6367 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -1518,9 +1518,9 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)
    };
 
    const unsigned max_uniform_components[MESA_SHADER_TYPES] = {
-      ctx->Const.VertexProgram.MaxUniformComponents,
-      ctx->Const.FragmentProgram.MaxUniformComponents,
-      ctx->Const.GeometryProgram.MaxUniformComponents
+      ctx->Const.VertexProgram.MaxCombinedUniformComponents,
+      ctx->Const.FragmentProgram.MaxCombinedUniformComponents,
+      ctx->Const.GeometryProgram.MaxCombinedUniformComponents
    };
 
    const unsigned max_uniform_blocks[MESA_SHADER_TYPES] = {
-- 
1.7.10.4



More information about the mesa-dev mailing list