diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 37 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 |
2 files changed, 30 insertions, 9 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index 5a006aee5..6cae6ff45 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -214,6 +214,20 @@ union Instruction { | |||
| 214 | BitField<56, 1, u64> neg_b; | 214 | BitField<56, 1, u64> neg_b; |
| 215 | } fsetp; | 215 | } fsetp; |
| 216 | 216 | ||
| 217 | union { | ||
| 218 | BitField<39, 3, u64> pred39; | ||
| 219 | BitField<42, 1, u64> neg_pred; | ||
| 220 | BitField<43, 1, u64> neg_a; | ||
| 221 | BitField<44, 1, u64> abs_b; | ||
| 222 | BitField<45, 2, PredOperation> op; | ||
| 223 | BitField<48, 4, PredCondition> cond; | ||
| 224 | BitField<53, 1, u64> neg_b; | ||
| 225 | BitField<54, 1, u64> abs_a; | ||
| 226 | BitField<52, 1, u64> bf; | ||
| 227 | BitField<55, 1, u64> ftz; | ||
| 228 | BitField<56, 1, u64> neg_imm; | ||
| 229 | } fset; | ||
| 230 | |||
| 217 | BitField<61, 1, u64> is_b_imm; | 231 | BitField<61, 1, u64> is_b_imm; |
| 218 | BitField<60, 1, u64> is_b_gpr; | 232 | BitField<60, 1, u64> is_b_gpr; |
| 219 | BitField<59, 1, u64> is_c_gpr; | 233 | BitField<59, 1, u64> is_c_gpr; |
| @@ -272,6 +286,9 @@ public: | |||
| 272 | FSETP_C, // Set Predicate | 286 | FSETP_C, // Set Predicate |
| 273 | FSETP_R, | 287 | FSETP_R, |
| 274 | FSETP_IMM, | 288 | FSETP_IMM, |
| 289 | FSET_C, | ||
| 290 | FSET_R, | ||
| 291 | FSET_IMM, | ||
| 275 | ISETP_C, | 292 | ISETP_C, |
| 276 | ISETP_IMM, | 293 | ISETP_IMM, |
| 277 | ISETP_R, | 294 | ISETP_R, |
| @@ -283,8 +300,9 @@ public: | |||
| 283 | Ffma, | 300 | Ffma, |
| 284 | Flow, | 301 | Flow, |
| 285 | Memory, | 302 | Memory, |
| 286 | FloatPredicate, | 303 | FloatSet, |
| 287 | IntegerPredicate, | 304 | FloatSetPredicate, |
| 305 | IntegerSetPredicate, | ||
| 288 | Unknown, | 306 | Unknown, |
| 289 | }; | 307 | }; |
| 290 | 308 | ||
| @@ -417,12 +435,15 @@ private: | |||
| 417 | INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), | 435 | INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), |
| 418 | INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), | 436 | INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), |
| 419 | INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), | 437 | INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), |
| 420 | INST("010010111011----", Id::FSETP_C, Type::FloatPredicate, "FSETP_C"), | 438 | INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"), |
| 421 | INST("010110111011----", Id::FSETP_R, Type::FloatPredicate, "FSETP_R"), | 439 | INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"), |
| 422 | INST("0011011-1011----", Id::FSETP_IMM, Type::FloatPredicate, "FSETP_IMM"), | 440 | INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"), |
| 423 | INST("010010110110----", Id::ISETP_C, Type::IntegerPredicate, "ISETP_C"), | 441 | INST("010010111011----", Id::FSETP_C, Type::FloatSetPredicate, "FSETP_C"), |
| 424 | INST("010110110110----", Id::ISETP_R, Type::IntegerPredicate, "ISETP_R"), | 442 | INST("010110111011----", Id::FSETP_R, Type::FloatSetPredicate, "FSETP_R"), |
| 425 | INST("0011011-0110----", Id::ISETP_IMM, Type::IntegerPredicate, "ISETP_IMM"), | 443 | INST("0011011-1011----", Id::FSETP_IMM, Type::FloatSetPredicate, "FSETP_IMM"), |
| 444 | INST("010010110110----", Id::ISETP_C, Type::IntegerSetPredicate, "ISETP_C"), | ||
| 445 | INST("010110110110----", Id::ISETP_R, Type::IntegerSetPredicate, "ISETP_R"), | ||
| 446 | INST("0011011-0110----", Id::ISETP_IMM, Type::IntegerSetPredicate, "ISETP_IMM"), | ||
| 426 | }; | 447 | }; |
| 427 | #undef INST | 448 | #undef INST |
| 428 | std::stable_sort(table.begin(), table.end(), [](const auto& a, const auto& b) { | 449 | std::stable_sort(table.begin(), table.end(), [](const auto& a, const auto& b) { |
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 086424395..896b6cd2c 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -519,7 +519,7 @@ private: | |||
| 519 | } | 519 | } |
| 520 | break; | 520 | break; |
| 521 | } | 521 | } |
| 522 | case OpCode::Type::FloatPredicate: { | 522 | case OpCode::Type::FloatSetPredicate: { |
| 523 | std::string op_a = instr.fsetp.neg_a ? "-" : ""; | 523 | std::string op_a = instr.fsetp.neg_a ? "-" : ""; |
| 524 | op_a += GetRegister(instr.gpr8); | 524 | op_a += GetRegister(instr.gpr8); |
| 525 | 525 | ||