diff options
author | bunnei <bunneidev@gmail.com> | 2018-04-28 04:19:14 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-04-29 02:03:18 +0200 |
commit | f2dcb3904918cf559f958f1cb4974b2702f91bb8 (patch) | |
tree | 54578b2a9c525c83447283963ea9ca63ff06d8b8 /src | |
parent | gl_shader_decompiler: Implement MOV32_IMM instruction. (diff) | |
download | yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar.gz yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar.bz2 yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar.lz yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar.xz yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.tar.zst yuzu-f2dcb3904918cf559f958f1cb4974b2702f91bb8.zip |
Diffstat (limited to 'src')
-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 { /// Register 255 is special cased to always be 0 static constexpr size_t ZeroIndex = 255; + enum class Size : u64 { + Byte = 0, + Short = 1, + Word = 2, + Long = 3, + }; + constexpr Register() = default; constexpr Register(u64 value) : value(value) {} @@ -236,6 +243,15 @@ union Instruction { BitField<56, 1, u64> neg_imm; } fset; + union { + BitField<10, 2, Register::Size> size; + BitField<13, 1, u64> is_signed; + BitField<41, 2, u64> selector; + BitField<45, 1, u64> negate_a; + BitField<49, 1, u64> abs_a; + BitField<50, 1, u64> saturate_a; + } i2i; + BitField<61, 1, u64> is_b_imm; BitField<60, 1, u64> is_b_gpr; BitField<59, 1, u64> is_c_gpr; @@ -314,6 +330,7 @@ public: FloatSet, FloatSetPredicate, IntegerSetPredicate, + I2I, Unknown, }; @@ -438,9 +455,6 @@ private: INST("0100110010111---", Id::I2F_C, Type::Arithmetic, "I2F_C"), INST("0101110010111---", Id::I2F_R, Type::Arithmetic, "I2F_R"), INST("0011100-10111---", Id::I2F_IMM, Type::Arithmetic, "I2F_IMM"), - INST("0100110011100---", Id::I2I_C, Type::Arithmetic, "I2I_C"), - INST("0101110011100---", Id::I2I_R, Type::Arithmetic, "I2I_R"), - INST("01110001-1000---", Id::I2I_IMM, Type::Arithmetic, "I2I_IMM"), INST("000001----------", Id::LOP32I, Type::Arithmetic, "LOP32I"), INST("0100110010011---", Id::MOV_C, Type::Arithmetic, "MOV_C"), INST("0101110010011---", Id::MOV_R, Type::Arithmetic, "MOV_R"), @@ -449,6 +463,9 @@ private: INST("0100110000101---", Id::SHR_C, Type::Arithmetic, "SHR_C"), INST("0101110000101---", Id::SHR_R, Type::Arithmetic, "SHR_R"), INST("0011100-00101---", Id::SHR_IMM, Type::Arithmetic, "SHR_IMM"), + INST("0100110011100---", Id::I2I_C, Type::I2I, "I2I_C"), + INST("0101110011100---", Id::I2I_R, Type::I2I, "I2I_R"), + INST("01110001-1000---", Id::I2I_IMM, Type::I2I, "I2I_IMM"), INST("01011000--------", Id::FSET_R, Type::FloatSet, "FSET_R"), INST("0100100---------", Id::FSET_C, Type::FloatSet, "FSET_C"), INST("0011000---------", Id::FSET_IMM, Type::FloatSet, "FSET_IMM"), |