nir/ttn: Silence some warnings at -Og
../src/gallium/auxiliary/nir/tgsi_to_nir.c: In function ‘ttn_mem’:
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1724:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1724 | instr = nir_intrinsic_instr_create(b->shader, op);
../src/gallium/auxiliary/nir/tgsi_to_nir.c:1697:15: warning: ‘op’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1697 | instr = nir_intrinsic_instr_create(b->shader, op);
Add some more unreachable() to make this go away.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8724>
This commit is contained in:
@@ -1709,6 +1709,8 @@ ttn_mem(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
|
||||
case TGSI_OPCODE_STORE:
|
||||
op = nir_intrinsic_store_ssbo;
|
||||
break;
|
||||
default:
|
||||
unreachable("unexpected buffer opcode");
|
||||
}
|
||||
|
||||
add_ssbo_var(c, resource_index);
|
||||
@@ -1738,6 +1740,8 @@ ttn_mem(struct ttn_compile *c, nir_alu_dest dest, nir_ssa_def **src)
|
||||
case TGSI_OPCODE_STORE:
|
||||
op = nir_intrinsic_image_deref_store;
|
||||
break;
|
||||
default:
|
||||
unreachable("unexpected file opcode");
|
||||
}
|
||||
|
||||
instr = nir_intrinsic_instr_create(b->shader, op);
|
||||
|
||||
Reference in New Issue
Block a user