gl_shader_decompiler: Add support for TEXS instruction.

This commit is contained in:
bunnei 2018-04-10 01:26:15 -04:00
parent 5ba71369ac
commit 8b4443c966
2 changed files with 43 additions and 12 deletions

View file

@ -16,10 +16,6 @@ struct Register {
constexpr Register(u64 value) : value(value) {}
constexpr u64 GetIndex() const {
return value;
}
constexpr operator u64() const {
return value;
}
@ -71,6 +67,19 @@ union Attribute {
u64 value;
};
union Sampler {
Sampler() = default;
constexpr Sampler(u64 value) : value(value) {}
enum class Index : u64 {
Sampler_0 = 8,
};
BitField<36, 13, Index> index;
u64 value;
};
union Uniform {
BitField<20, 14, u64> offset;
BitField<34, 5, u64> index;
@ -295,7 +304,6 @@ union Instruction {
BitField<20, 8, Register> gpr20;
BitField<20, 7, SubOp> sub_op;
BitField<28, 8, Register> gpr28;
BitField<36, 13, u64> imm36;
BitField<39, 8, Register> gpr39;
union {
@ -316,6 +324,7 @@ union Instruction {
Attribute attribute;
Uniform uniform;
Sampler sampler;
u64 hex;
};