mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 22:10:11 +01:00
microsoft/compiler: Add scope for declaration in case statement.
This patch fixes this build error.
../src/microsoft/compiler/dxil_nir.c: In function 'extract_comps_from_vec32':
../src/microsoft/compiler/dxil_nir.c:52:10: error: a label can only be part of a statement and a declaration is not a statement
52 | unsigned dst_offs = i * comps_per32b;
| ^~~~~~~~
Fixes: b9c61379ab ("microsoft/compiler: translate nir to dxil")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7563>
This commit is contained in:
parent
f4c240f34d
commit
791fecfae1
1 changed files with 2 additions and 1 deletions
|
|
@ -48,12 +48,13 @@ extract_comps_from_vec32(nir_builder *b, nir_ssa_def *vec32,
|
|||
dst_comps[i] = nir_channel(b, vec32, i);
|
||||
break;
|
||||
case 16:
|
||||
case 8:
|
||||
case 8: {
|
||||
unsigned dst_offs = i * comps_per32b;
|
||||
|
||||
tmp = nir_unpack_bits(b, nir_channel(b, vec32, i), dst_bit_size);
|
||||
for (unsigned j = 0; j < comps_per32b && dst_offs + j < num_dst_comps; j++)
|
||||
dst_comps[dst_offs + j] = nir_channel(b, tmp, j);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue