glsl/nir: Avoid overflow when setting max_uniform_location
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Wed, 21 Aug 2019 17:04:56 +0000 (10:04 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Tue, 10 Sep 2019 21:36:46 +0000 (14:36 -0700)
commit4f33f96c4517f86f6f720f745cd49f8a0754393b
tree23b0194c0191e0fb7d4ce71878b71b9af73afe86
parent304719993120c463e14de40cbe0297e645142881
glsl/nir: Avoid overflow when setting max_uniform_location

Don't use the UNMAPPED_UNIFORM_LOC (-1) to set the unsigned
max_uniform_location.  Those unmapped uniforms don't have to be
accounted at this point.

Fixes: 7a9e5cdfbb9 ("nir/linker: Add gl_nir_link_uniforms()")
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/gl_nir_link_uniforms.c