mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
spirv: Add a switch statement for the block store opcode
This parallels what we do for vtn_block_load except that we don't yet support anything except SSBO loads through this path. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
91d91ce3e2
commit
98edf6bca4
1 changed files with 10 additions and 1 deletions
|
|
@ -850,11 +850,20 @@ static void
|
|||
vtn_block_store(struct vtn_builder *b, struct vtn_ssa_value *src,
|
||||
struct vtn_pointer *dst)
|
||||
{
|
||||
nir_intrinsic_op op;
|
||||
switch (dst->mode) {
|
||||
case vtn_variable_mode_ssbo:
|
||||
op = nir_intrinsic_store_ssbo;
|
||||
break;
|
||||
default:
|
||||
vtn_fail("Invalid block variable mode");
|
||||
}
|
||||
|
||||
nir_ssa_def *offset, *index = NULL;
|
||||
unsigned chain_idx;
|
||||
offset = vtn_pointer_to_offset(b, dst, &index, &chain_idx);
|
||||
|
||||
_vtn_block_load_store(b, nir_intrinsic_store_ssbo, false, index, offset,
|
||||
_vtn_block_load_store(b, op, false, index, offset,
|
||||
0, 0, dst->chain, chain_idx, dst->type, &src);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue