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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user