diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.cpp b/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.cpp index 49ccb7d62..ae3ecea32 100644 --- a/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.cpp +++ b/src/shader_recompiler/frontend/maxwell/translate/impl/load_constant.cpp | |||
| @@ -30,25 +30,25 @@ void TranslatorVisitor::LDC(u64 insn) { | |||
| 30 | const auto [index, offset]{Slot(ir, ldc.mode, imm_index, reg, imm)}; | 30 | const auto [index, offset]{Slot(ir, ldc.mode, imm_index, reg, imm)}; |
| 31 | switch (ldc.size) { | 31 | switch (ldc.size) { |
| 32 | case Size::U8: | 32 | case Size::U8: |
| 33 | X(ldc.dest_reg, ir.GetCbuf(index, offset, 8, false)); | 33 | X(ldc.dest_reg, IR::U32{ir.GetCbuf(index, offset, 8, false)}); |
| 34 | break; | 34 | break; |
| 35 | case Size::S8: | 35 | case Size::S8: |
| 36 | X(ldc.dest_reg, ir.GetCbuf(index, offset, 8, true)); | 36 | X(ldc.dest_reg, IR::U32{ir.GetCbuf(index, offset, 8, true)}); |
| 37 | break; | 37 | break; |
| 38 | case Size::U16: | 38 | case Size::U16: |
| 39 | X(ldc.dest_reg, ir.GetCbuf(index, offset, 16, false)); | 39 | X(ldc.dest_reg, IR::U32{ir.GetCbuf(index, offset, 16, false)}); |
| 40 | break; | 40 | break; |
| 41 | case Size::S16: | 41 | case Size::S16: |
| 42 | X(ldc.dest_reg, ir.GetCbuf(index, offset, 16, true)); | 42 | X(ldc.dest_reg, IR::U32{ir.GetCbuf(index, offset, 16, true)}); |
| 43 | break; | 43 | break; |
| 44 | case Size::B32: | 44 | case Size::B32: |
| 45 | X(ldc.dest_reg, ir.GetCbuf(index, offset, 32, false)); | 45 | X(ldc.dest_reg, IR::U32{ir.GetCbuf(index, offset, 32, false)}); |
| 46 | break; | 46 | break; |
| 47 | case Size::B64: { | 47 | case Size::B64: { |
| 48 | if (!IR::IsAligned(ldc.dest_reg, 2)) { | 48 | if (!IR::IsAligned(ldc.dest_reg, 2)) { |
| 49 | throw NotImplementedException("Unaligned destination register"); | 49 | throw NotImplementedException("Unaligned destination register"); |
| 50 | } | 50 | } |
| 51 | const IR::Value vector{ir.UnpackUint2x32(ir.GetCbuf(index, offset, 64, false))}; | 51 | const IR::Value vector{ir.GetCbuf(index, offset, 64, false)}; |
| 52 | for (int i = 0; i < 2; ++i) { | 52 | for (int i = 0; i < 2; ++i) { |
| 53 | X(ldc.dest_reg + i, IR::U32{ir.CompositeExtract(vector, i)}); | 53 | X(ldc.dest_reg + i, IR::U32{ir.CompositeExtract(vector, i)}); |
| 54 | } | 54 | } |