aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2020-05-06 23:51:42 +0200
committerMarge Bot <[email protected]>2020-05-19 07:52:13 +0000
commit041df7949656dd691b1e1484ba6c3c1a47b02285 (patch)
tree76f6ae6b31c6e6b9b3ed4c8b11c28c7be1ae9bce /src
parent8977946aa2aba6652e847fdfdb499c7da3a25b42 (diff)
r600/sfn: Fix RAT instruction 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')
-rw-r--r--src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp14
1 files changed, 9 insertions, 5 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 4898d5b2a8e..77e84e33b21 100644
--- a/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_ir_to_assembly.cpp
@@ -1071,7 +1071,7 @@ bool AssemblyFromShaderLegacyImpl::emit_rat(const RatInstruction& instr)
{
struct r600_bytecode_gds gds;
- int rat_idx = -1;
+ int rat_idx = instr.rat_id();
EBufferIndexMode rat_index_mode = bim_none;
auto addr = instr.rat_id_offset();
@@ -1127,10 +1127,14 @@ bool AssemblyFromShaderLegacyImpl::emit_rat(const RatInstruction& instr)
cf->output.index_gpr = instr.index_gpr();
cf->output.comp_mask = instr.comp_mask();
cf->output.burst_count = instr.burst_count();
- cf->output.swizzle_x = instr.data_swz(0);
- cf->output.swizzle_y = instr.data_swz(1);
- cf->output.swizzle_z = instr.data_swz(2);
- cf->output.swizzle_w = instr.data_swz(3);
+ assert(instr.data_swz(0) == PIPE_SWIZZLE_X);
+ if (cf->rat.inst != RatInstruction::STORE_TYPED) {
+ assert(instr.data_swz(1) == PIPE_SWIZZLE_Y ||
+ instr.data_swz(1) == PIPE_SWIZZLE_MAX) ;
+ assert(instr.data_swz(2) == PIPE_SWIZZLE_Z ||
+ instr.data_swz(2) == PIPE_SWIZZLE_MAX) ;
+ }
+
cf->vpm = 1;
cf->barrier = 1;
cf->mark = instr.need_ack();