mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 20:38:06 +02:00
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.
This commit is contained in:
parent
e0e94026a0
commit
d7db14ab7d
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue