aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-05-06 23:51:09 +0200
committerMarge Bot <[email protected]>2020-05-19 07:52:13 +0000
commit8977946aa2aba6652e847fdfdb499c7da3a25b42 (patch)
tree1ef48cfcd4f425e4e6c25c14a523c134117df15f /src/gallium/drivers/r600
parentb6eb19dd633c415761a5f2310be4be354a0ba0bd (diff)
r600/sfn: Fix GDS assembly emission
Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5085>
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp38
1 files changed, 17 insertions, 21 deletions
diff --git a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
index 8197e01dda4..4898d5b2a8e 100644
--- a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
@@ -935,31 +935,27 @@ bool AssemblyFromShaderLegacyImpl::emit_gds(const GDSInstr& instr)
memset(&gds, 0, sizeof(struct r600_bytecode_gds));
gds.op = ds_opcode_map.at(instr.op());
- gds.dst_gpr = instr.dest_sel();
- gds.uav_id = (uav_idx >= 0 ? uav_idx : 0) + instr.uav_base();
- gds.uav_index_mode = uav_idx >= 0 ? bim_none : bim_one;
- gds.src_gpr = instr.src_sel();
+ gds.dst_gpr = instr.dest_sel();
+ gds.uav_id = (uav_idx >= 0 ? uav_idx : 0) + instr.uav_base();
+ gds.uav_index_mode = uav_idx >= 0 ? bim_none : bim_one;
+ gds.src_gpr = instr.src_sel();
- if (instr.op() == DS_OP_CMP_XCHG_RET) {
- gds.src_sel_z = 1;
- } else {
- gds.src_sel_z = 7;
- }
+ gds.src_sel_x = instr.src_swizzle(0);
+ gds.src_sel_y = instr.src_swizzle(1);
+ gds.src_sel_z = instr.src_swizzle(2);
- gds.src_sel_x = instr.src_swizzle(0);
- gds.src_sel_y = instr.src_swizzle(1);
-
- gds.dst_sel_x = 0;
- gds.dst_sel_y = 7;
- gds.dst_sel_z = 7;
- gds.dst_sel_w = 7;
- gds.src_gpr2 = 0;
- gds.alloc_consume = 1; // Not Cayman
+ gds.dst_sel_x = instr.dest_swizzle(0);
+ gds.dst_sel_y = 7;
+ gds.dst_sel_z = 7;
+ gds.dst_sel_w = 7;
+ gds.src_gpr2 = 0;
+ gds.alloc_consume = 1; // Not Cayman
int r = r600_bytecode_add_gds(m_bc, &gds);
- if (r)
- return false;
- m_bc->cf_last->vpm = 1;
+ if (r)
+ return false;
+ m_bc->cf_last->vpm = 1;
+ m_bc->cf_last->barrier = 1;
return true;
}