diff options
author | Brian Paul <brianp@vmware.com> | 2011-03-11 10:03:40 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2011-03-11 10:04:17 -0700 |
commit | d7db14ab7d66520b6030c0aa48c94507179a8d4e (patch) | |
tree | 42e2e1ccd8da4b2fa5ea8dd73c49c3b15eea4426 | |
parent | e0e94026a0648d6b33d6b7cf2b9b01429cf945e4 (diff) | |
download | external_mesa3d-d7db14ab7d66520b6030c0aa48c94507179a8d4e.zip external_mesa3d-d7db14ab7d66520b6030c0aa48c94507179a8d4e.tar.gz external_mesa3d-d7db14ab7d66520b6030c0aa48c94507179a8d4e.tar.bz2 |
mesa: test against MaxUniformComponents in check_resources()
Since we're compiling/linking GLSL shaders we should check against
the shader uniform limits, not the legacy vertex/fragment program
parameter limits which are usually lower.
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index c4704fe..eff0d37 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2454,7 +2454,7 @@ check_resources(const struct gl_context *ctx, fail_link(shader_program, "Too many vertex shader texture samplers"); } if (prog->Parameters->NumParameters > - ctx->Const.VertexProgram.MaxParameters) { + ctx->Const.VertexProgram.MaxUniformComponents / 4) { fail_link(shader_program, "Too many vertex shader constants"); } break; @@ -2464,7 +2464,7 @@ check_resources(const struct gl_context *ctx, fail_link(shader_program, "Too many geometry shader texture samplers"); } if (prog->Parameters->NumParameters > - ctx->Const.GeometryProgram.MaxParameters) { + ctx->Const.GeometryProgram.MaxUniformComponents / 4) { fail_link(shader_program, "Too many geometry shader constants"); } break; @@ -2474,7 +2474,7 @@ check_resources(const struct gl_context *ctx, fail_link(shader_program, "Too many fragment shader texture samplers"); } if (prog->Parameters->NumParameters > - ctx->Const.FragmentProgram.MaxParameters) { + ctx->Const.FragmentProgram.MaxUniformComponents / 4) { fail_link(shader_program, "Too many fragment shader constants"); } break; |