summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/engines/shader_bytecode.h4
-rw-r--r--src/video_core/shader/decode/arithmetic_integer.cpp4
-rw-r--r--src/video_core/shader/decode/bfi.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h
index 81b6d9eff..955f981bd 100644
--- a/src/video_core/engines/shader_bytecode.h
+++ b/src/video_core/engines/shader_bytecode.h
@@ -1657,11 +1657,11 @@ union Instruction {
1657 } xmad; 1657 } xmad;
1658 1658
1659 union { 1659 union {
1660 BitField<20, 14, u64> offset; 1660 BitField<20, 14, u64> shifted_offset;
1661 BitField<34, 5, u64> index; 1661 BitField<34, 5, u64> index;
1662 1662
1663 u64 GetOffset() const { 1663 u64 GetOffset() const {
1664 return offset * 4; 1664 return shifted_offset * 4;
1665 } 1665 }
1666 } cbuf34; 1666 } cbuf34;
1667 1667
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp
index e60875cc4..21366869d 100644
--- a/src/video_core/shader/decode/arithmetic_integer.cpp
+++ b/src/video_core/shader/decode/arithmetic_integer.cpp
@@ -166,13 +166,13 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
166 const auto [op_rhs, test] = [&]() -> std::pair<Node, Node> { 166 const auto [op_rhs, test] = [&]() -> std::pair<Node, Node> {
167 switch (opcode->get().GetId()) { 167 switch (opcode->get().GetId()) {
168 case OpCode::Id::ICMP_CR: 168 case OpCode::Id::ICMP_CR:
169 return {GetConstBuffer(instr.cbuf34.index, instr.cbuf34.offset), 169 return {GetConstBuffer(instr.cbuf34.index, instr.cbuf34.GetOffset()),
170 GetRegister(instr.gpr39)}; 170 GetRegister(instr.gpr39)};
171 case OpCode::Id::ICMP_R: 171 case OpCode::Id::ICMP_R:
172 return {GetRegister(instr.gpr20), GetRegister(instr.gpr39)}; 172 return {GetRegister(instr.gpr20), GetRegister(instr.gpr39)};
173 case OpCode::Id::ICMP_RC: 173 case OpCode::Id::ICMP_RC:
174 return {GetRegister(instr.gpr39), 174 return {GetRegister(instr.gpr39),
175 GetConstBuffer(instr.cbuf34.index, instr.cbuf34.offset)}; 175 GetConstBuffer(instr.cbuf34.index, instr.cbuf34.GetOffset())};
176 case OpCode::Id::ICMP_IMM: 176 case OpCode::Id::ICMP_IMM:
177 return {Immediate(instr.alu.GetSignedImm20_20()), GetRegister(instr.gpr39)}; 177 return {Immediate(instr.alu.GetSignedImm20_20()), GetRegister(instr.gpr39)};
178 default: 178 default:
diff --git a/src/video_core/shader/decode/bfi.cpp b/src/video_core/shader/decode/bfi.cpp
index f992bbe2a..70d1c055b 100644
--- a/src/video_core/shader/decode/bfi.cpp
+++ b/src/video_core/shader/decode/bfi.cpp
@@ -21,7 +21,7 @@ u32 ShaderIR::DecodeBfi(NodeBlock& bb, u32 pc) {
21 switch (opcode->get().GetId()) { 21 switch (opcode->get().GetId()) {
22 case OpCode::Id::BFI_RC: 22 case OpCode::Id::BFI_RC:
23 return {GetRegister(instr.gpr39), 23 return {GetRegister(instr.gpr39),
24 GetConstBuffer(instr.cbuf34.index, instr.cbuf34.offset)}; 24 GetConstBuffer(instr.cbuf34.index, instr.cbuf34.GetOffset())};
25 case OpCode::Id::BFI_IMM_R: 25 case OpCode::Id::BFI_IMM_R:
26 return {Immediate(instr.alu.GetSignedImm20_20()), GetRegister(instr.gpr39)}; 26 return {Immediate(instr.alu.GetSignedImm20_20()), GetRegister(instr.gpr39)};
27 default: 27 default: