From 8b4443c966c1f00ca468f41584b74fe22a4580af Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 10 Apr 2018 01:26:15 -0400 Subject: gl_shader_decompiler: Add support for TEXS instruction. --- src/video_core/engines/shader_bytecode.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/video_core/engines') diff --git a/src/video_core/engines/shader_bytecode.h b/src/video_core/engines/shader_bytecode.h index eff0c35a1..51cf4af9f 100644 --- a/src/video_core/engines/shader_bytecode.h +++ b/src/video_core/engines/shader_bytecode.h @@ -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; }; -- cgit v1.2.3