diff options
Diffstat (limited to '')
| -rw-r--r-- | src/video_core/engines/shader_bytecode.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index fba9ab496..0cbe5e94d 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h | |||
| @@ -25,6 +25,13 @@ struct Register { | |||
| 25 | /// Register 255 is special cased to always be 0 | 25 | /// Register 255 is special cased to always be 0 |
| 26 | static constexpr size_t ZeroIndex = 255; | 26 | static constexpr size_t ZeroIndex = 255; |
| 27 | 27 | ||
| 28 | enum class Size : u64 { | ||
| 29 | Byte = 0, | ||
| 30 | Short = 1, | ||
| 31 | Word = 2, | ||
| 32 | Long = 3, | ||
| 33 | }; | ||
| 34 | |||
| 28 | constexpr Register() = default; | 35 | constexpr Register() = default; |
| 29 | 36 | ||
| 30 | constexpr Register(u64 value) : value(value) {} | 37 | constexpr Register(u64 value) : value(value) {} |
| @@ -236,6 +243,15 @@ union Instruction { | |||
| 236 | BitField<56, 1, u64> neg_imm; | 243 | BitField<56, 1, u64> neg_imm; |
| 237 | } fset; | 244 | } fset; |
| 238 | 245 | ||
| 246 | union { | ||
| 247 | BitField<10, 2, Register::Size> size; | ||
| 248 | BitField<13, 1, u64> is_signed; | ||
| 249 | BitField<41, 2, u64> selector; | ||
| 250 | BitField<45, 1, u64> negate_a; | ||
| 251 | BitField<49, 1, u64> abs_a; | ||
| 252 | BitField<50, 1, u64> saturate_a; | ||
| 253 | } i2i; | ||
| 254 | |||
| 239 | BitField<61, 1, u64> is_b_imm; | 255 | BitField<61, 1, u64> is_b_imm; |
| 240 | BitField<60, 1, u64> is_b_gpr; | 256 | BitField<60, 1, u64> is_b_gpr; |
| 241 | BitField<59, 1, u64> is_c_gpr; | 257 | BitField<59, 1, u64> is_c_gpr; |
| @@ -314,6 +330,7 @@ public: | |||
| 314 | FloatSet, | 330 | FloatSet, |
| 315 | FloatSetPredicate, | 331 | FloatSetPredicate, |
| 316 | IntegerSetPredicate, | 332 | IntegerSetPredicate, |
| 333 | I2I, | ||
| 317 | Unknown, | 334 | Unknown, |
| 318 | }; | 335 | }; |
| 319 | 336 | ||
| @@ -438,9 +455,6 @@ private: | |||
| 438 | INST("0100110010111---", Id::I2F_C, Type::Arithmetic, "I2F_C"), | 455 | INST("0100110010111---", Id::I2F_C, Type::Arithmetic, "I2F_C"), |
| 439 | INST("0101110010111---", Id::I2F_R, Type::Arithmetic, "I2F_R"), | 456 | INST("0101110010111---", Id::I2F_R, Type::Arithmetic, "I2F_R"), |
| 440 | INST("0011100-10111---", Id::I2F_IMM, Type::Arithmetic, "I2F_IMM"), | 457 | INST("0011100-10111---", Id::I2F_IMM, Type::Arithmetic, "I2F_IMM"), |
| 441 | INST("0100110011100---", Id::I2I_C, Type::Arithmetic, "I2I_C"), | ||
| 442 | INST("0101110011100---", Id::I2I_R, Type::Arithmetic, "I2I_R"), | ||
| 443 | INST("01110001-1000---", Id::I2I_IMM, Type::Arithmetic, "I2I_IMM"), | ||
| 444 | INST("000001----------", Id::LOP32I, Type::Arithmetic, "LOP32I"), | 458 | INST("000001----------", Id::LOP32I, Type::Arithmetic, "LOP32I"), |
| 445 | INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"), | 459 | INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"), |
| 446 | INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"), | 460 | INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"), |
| @@ -449,6 +463,9 @@ private: | |||
| 449 | INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), | 463 | INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), |
| 450 | INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), | 464 | INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), |
| 451 | INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), | 465 | INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), |
| 466 | INST("0100110011100---", Id::I2I_C, Type::I2I, "I2I_C"), | ||
| 467 | INST("0101110011100---", Id::I2I_R, Type::I2I, "I2I_R"), | ||
| 468 | INST("01110001-1000---", Id::I2I_IMM, Type::I2I, "I2I_IMM"), | ||
| 452 | INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"), | 469 | INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"), |
| 453 | INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"), | 470 | INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"), |
| 454 | INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"), | 471 | INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"), |