[Mesa-dev] [PATCH 4/5] glsl/linker: Mark no locations as invalid instead of marking all locations
Ian Romanick
idr at freedesktop.org
Sat Jan 6 05:40:33 UTC 2018
From: Ian Romanick <ian.d.romanick at intel.com>
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 at intel.com>
---
src/compiler/glsl/linker.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp
index 33fd76d..010f591 100644
--- a/src/compiler/glsl/linker.cpp
+++ b/src/compiler/glsl/linker.cpp
@@ -2595,7 +2595,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)
--
2.9.5
More information about the mesa-dev
mailing list