glsl/linker: Safely generate mask of possible locations
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 6 Jan 2018 02:43:32 +0000 (18:43 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Jan 2018 15:21:12 +0000 (07:21 -0800)
commit336afe7d7a8e066e1286bb93791d5c3d96ccc317
tree98c33616b7afdd4bebc081cfe63b3a69a93cfcf4
parent0c9df36157aca1e725f037e5adc54100aa387bd3
glsl/linker: Safely generate mask of possible locations

If MaxAttribs were ever raised to 32, undefined behavior would occur.
We had already gone to the effort (albeit incorrectly) handle this in
one case, so fix them all.

CID: 1369628
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
src/compiler/glsl/linker.cpp