mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 23:30:10 +01:00
nir/serialize: cast swizzle before shifting
fixes undefined behaviour with enabled vec16 Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
e6b2af56cb
commit
c83b1a4560
1 changed files with 1 additions and 1 deletions
|
|
@ -879,7 +879,7 @@ write_alu(write_ctx *ctx, const nir_alu_instr *alu)
|
|||
unsigned value = 0;
|
||||
|
||||
for (unsigned j = 0; j < 8 && o + j < src_channels; j++) {
|
||||
value |= alu->src[i].swizzle[o + j] <<
|
||||
value |= (uint32_t)alu->src[i].swizzle[o + j] <<
|
||||
(4 * j); /* 4 bits per swizzle */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue