mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 20:20:09 +01:00
glsl/linker: Avoid buffer over-run in parcel_out_uniform_storage::visit_field
When too may uniforms are used, the error will be caught in check_resources (src/glsl/linker.cpp). NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: Benoit Jacob <bjacob@mozilla.com>
This commit is contained in:
parent
9b028faeaa
commit
ff996cafce
1 changed files with 1 additions and 1 deletions
|
|
@ -313,7 +313,7 @@ private:
|
|||
const gl_texture_index target = base_type->sampler_index();
|
||||
const unsigned shadow = base_type->sampler_shadow;
|
||||
for (unsigned i = this->uniforms[id].sampler
|
||||
; i < this->next_sampler
|
||||
; i < MIN2(this->next_sampler, MAX_SAMPLERS)
|
||||
; i++) {
|
||||
this->targets[i] = target;
|
||||
this->shader_samplers_used |= 1U << i;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue