diff options
author | Ian Romanick <[email protected]> | 2018-01-05 18:40:21 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2018-01-10 07:21:11 -0800 |
commit | 0c9df36157aca1e725f037e5adc54100aa387bd3 (patch) | |
tree | 62370a45122ced8d57a60e9501da30b62d649d42 /src/compiler | |
parent | 702dc43f7eda025103df8adaf9a57067f8f56f87 (diff) |
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 <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 6f9680aae78..d1f10eeecd8 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -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) |