diff options
author | Jason Ekstrand <[email protected]> | 2017-10-18 16:36:04 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-05 20:55:39 -0800 |
commit | 98edf6bca4ba626cd0ab5da71bf09eaf3e90e444 (patch) | |
tree | 658a3dac40295771272b63eabb5984cfa8d6ea5d /src/compiler/spirv | |
parent | 91d91ce3e24f198f2f5b88c22e3186a22334295e (diff) |
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 <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r-- | src/compiler/spirv/vtn_variables.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 08428a2823f..49d9d399625 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -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); } |