glsl/linker: Mark no locations as invalid instead of marking all locations

If max_index were ever 32, the linker would have marked all 32
locations as invalid instead of marking none of them as invalid.  It's
a good thing the maximum value actually set by any driver for
MaxAttribs is 16.

Found by inspection while investigating CID 1369628.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
This commit is contained in:
Ian Romanick 2018-01-05 18:40:21 -08:00
parent 702dc43f7e
commit 0c9df36157
1 changed files with 1 additions and 1 deletions

View File

@ -2583,7 +2583,7 @@ assign_attribute_or_color_locations(void *mem_ctx,
/* Mark invalid locations as being used.
*/
unsigned used_locations = (max_index >= 32)
? ~0 : ~((1 << max_index) - 1);
? 0 : ~((1 << max_index) - 1);
unsigned double_storage_locations = 0;
assert((target_index == MESA_SHADER_VERTEX)