diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/shader/decode/arithmetic_integer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp index 83d3944ac..2fe787d6f 100644 --- a/src/video_core/shader/decode/arithmetic_integer.cpp +++ b/src/video_core/shader/decode/arithmetic_integer.cpp | |||
| @@ -293,52 +293,52 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) { | |||
| 293 | 293 | ||
| 294 | void ShaderIR::WriteLop3Instruction(NodeBlock& bb, Register dest, Node op_a, Node op_b, Node op_c, | 294 | void ShaderIR::WriteLop3Instruction(NodeBlock& bb, Register dest, Node op_a, Node op_b, Node op_c, |
| 295 | Node imm_lut, bool sets_cc) { | 295 | Node imm_lut, bool sets_cc) { |
| 296 | const Node lop3_fast = [&](Node na, Node nb, Node nc, Node ttbl) { | 296 | const Node lop3_fast = [&](const Node na, const Node nb, const Node nc, const Node ttbl) { |
| 297 | Node value = Immediate(0); | 297 | Node value = Immediate(0); |
| 298 | ImmediateNode imm = std::get<ImmediateNode>(*ttbl); | 298 | const ImmediateNode imm = std::get<ImmediateNode>(*ttbl); |
| 299 | if (imm.GetValue() & 0x01) { | 299 | if (imm.GetValue() & 0x01) { |
| 300 | Node a = Operation(OperationCode::IBitwiseNot, na); | 300 | const Node a = Operation(OperationCode::IBitwiseNot, na); |
| 301 | Node b = Operation(OperationCode::IBitwiseNot, nb); | 301 | const Node b = Operation(OperationCode::IBitwiseNot, nb); |
| 302 | Node c = Operation(OperationCode::IBitwiseNot, nc); | 302 | const Node c = Operation(OperationCode::IBitwiseNot, nc); |
| 303 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, b); | 303 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, b); |
| 304 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); | 304 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); |
| 305 | value = Operation(OperationCode::IBitwiseOr, value, r); | 305 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 306 | } | 306 | } |
| 307 | if (imm.GetValue() & 0x02) { | 307 | if (imm.GetValue() & 0x02) { |
| 308 | Node a = Operation(OperationCode::IBitwiseNot, na); | 308 | const Node a = Operation(OperationCode::IBitwiseNot, na); |
| 309 | Node b = Operation(OperationCode::IBitwiseNot, nb); | 309 | const Node b = Operation(OperationCode::IBitwiseNot, nb); |
| 310 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, b); | 310 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, b); |
| 311 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); | 311 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); |
| 312 | value = Operation(OperationCode::IBitwiseOr, value, r); | 312 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 313 | } | 313 | } |
| 314 | if (imm.GetValue() & 0x04) { | 314 | if (imm.GetValue() & 0x04) { |
| 315 | Node a = Operation(OperationCode::IBitwiseNot, na); | 315 | const Node a = Operation(OperationCode::IBitwiseNot, na); |
| 316 | Node c = Operation(OperationCode::IBitwiseNot, nc); | 316 | const Node c = Operation(OperationCode::IBitwiseNot, nc); |
| 317 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, nb); | 317 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, nb); |
| 318 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); | 318 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); |
| 319 | value = Operation(OperationCode::IBitwiseOr, value, r); | 319 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 320 | } | 320 | } |
| 321 | if (imm.GetValue() & 0x08) { | 321 | if (imm.GetValue() & 0x08) { |
| 322 | Node a = Operation(OperationCode::IBitwiseNot, na); | 322 | const Node a = Operation(OperationCode::IBitwiseNot, na); |
| 323 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, nb); | 323 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, a, nb); |
| 324 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); | 324 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); |
| 325 | value = Operation(OperationCode::IBitwiseOr, value, r); | 325 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 326 | } | 326 | } |
| 327 | if (imm.GetValue() & 0x10) { | 327 | if (imm.GetValue() & 0x10) { |
| 328 | Node b = Operation(OperationCode::IBitwiseNot, nb); | 328 | const Node b = Operation(OperationCode::IBitwiseNot, nb); |
| 329 | Node c = Operation(OperationCode::IBitwiseNot, nc); | 329 | const Node c = Operation(OperationCode::IBitwiseNot, nc); |
| 330 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, b); | 330 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, b); |
| 331 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); | 331 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); |
| 332 | value = Operation(OperationCode::IBitwiseOr, value, r); | 332 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 333 | } | 333 | } |
| 334 | if (imm.GetValue() & 0x20) { | 334 | if (imm.GetValue() & 0x20) { |
| 335 | Node b = Operation(OperationCode::IBitwiseNot, nb); | 335 | const Node b = Operation(OperationCode::IBitwiseNot, nb); |
| 336 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, b); | 336 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, b); |
| 337 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); | 337 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, nc); |
| 338 | value = Operation(OperationCode::IBitwiseOr, value, r); | 338 | value = Operation(OperationCode::IBitwiseOr, value, r); |
| 339 | } | 339 | } |
| 340 | if (imm.GetValue() & 0x40) { | 340 | if (imm.GetValue() & 0x40) { |
| 341 | Node c = Operation(OperationCode::IBitwiseNot, nc); | 341 | const Node c = Operation(OperationCode::IBitwiseNot, nc); |
| 342 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, nb); | 342 | Node r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, na, nb); |
| 343 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); | 343 | r = Operation(OperationCode::IBitwiseAnd, NO_PRECISE, r, c); |
| 344 | value = Operation(OperationCode::IBitwiseOr, value, r); | 344 | value = Operation(OperationCode::IBitwiseOr, value, r); |