mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-16 16:18:06 +02:00
mesa: Use the Elements macro for the sampler index assert in validate_samplers().
This is probably nicer if the array size ever changes.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 4744195628)
This commit is contained in:
parent
338cf7128c
commit
a470104763
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue