From ff996cafce511dd8a6c4e066e409c23e147a670c Mon Sep 17 00:00:00 2001 From: Stéphane Marchesin Date: Tue, 14 Aug 2012 17:15:54 -0700 Subject: glsl/linker: Avoid buffer over-run in parcel_out_uniform_storage::visit_field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ian Romanick Tested-by: Benoit Jacob --- src/glsl/link_uniforms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 25dc1d7dc55..eef9025cf28 100644 --- a/src/glsl/link_uniforms.cpp +++ b/src/glsl/link_uniforms.cpp @@ -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; -- cgit v1.2.3