glsl: fix array assignments of a swizzled vector
This happens in situations where we might do vec.wzyx[i] = ... The swizzle would get effectively ignored because of the interaction between how ir_assignment->set_lhs works and overwriting the write_mask. There are two cases, one where i is a constant, and another where i is variable. We have to be extra-careful in both cases. Fixes the following WebGL test: https://www.khronos.org/registry/webgl/sdk/tests/conformance2/glsl3/vector-dynamic-indexing-swizzled-lvalue.html And the new piglit tests: swizzled-writemask-indexing-nonconst.shader_test swizzled-writemask-indexing.shader_test Signed-off-by:Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit 1bb1c03d)
Loading
Please register or sign in to comment