aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/shaderapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/shaderapi.c')
-rw-r--r--mesalib/src/mesa/main/shaderapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index cbc51ce19..94671ea25 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -1032,7 +1032,7 @@ validate_samplers(const struct gl_program *prog, char *errMsg)
"TEXTURE_2D",
"TEXTURE_1D",
};
- GLint targetUsed[MAX_TEXTURE_IMAGE_UNITS];
+ GLint targetUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
GLbitfield samplersUsed = prog->SamplersUsed;
GLuint i;
@@ -1050,7 +1050,7 @@ validate_samplers(const struct gl_program *prog, char *errMsg)
gl_texture_index target;
GLint sampler = _mesa_ffs(samplersUsed) - 1;
assert(sampler >= 0);
- assert(sampler < MAX_TEXTURE_IMAGE_UNITS);
+ assert(sampler < Elements(prog->SamplerUnits));
unit = prog->SamplerUnits[sampler];
target = prog->SamplerTargets[sampler];
if (targetUsed[unit] != -1 && targetUsed[unit] != (int) target) {