summaryrefslogtreecommitdiffstats
path: root/src/video_core/engines
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-10 07:26:15 +0200
committerbunnei <bunneidev@gmail.com>2018-04-17 22:36:38 +0200
commit8b4443c966c1f00ca468f41584b74fe22a4580af (patch)
tree361d7f72d11b7deb442f749f57bb3d35d616c7ac /src/video_core/engines
parentgl_shader_decompiler: Use fragment output color for GPR 0-3. (diff)
downloadyuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar.gz
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar.bz2
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar.lz
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar.xz
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.tar.zst
yuzu-8b4443c966c1f00ca468f41584b74fe22a4580af.zip
Diffstat (limited to 'src/video_core/engines')
-rw-r--r--src/video_core/engines/shader_bytecode.h19
1 files changed, 14 insertions, 5 deletions
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;
};