summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader_environment.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-04 02:56:30 +0100
committerGitHub <noreply@github.com>2022-01-04 02:56:30 +0100
commitc68a0d17fc30d9b91b8324b3899556e3ebfea8d5 (patch)
tree3ec6f215ab86e6a9baf181efc9839eaa8bf56cf4 /src/video_core/shader_environment.h
parentMerge pull request #7668 from ameerj/fence-stop-token (diff)
parentShaderDecompiler: Add a debug option to dump the game's shaders. (diff)
downloadyuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar.gz
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar.bz2
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar.lz
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar.xz
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.tar.zst
yuzu-c68a0d17fc30d9b91b8324b3899556e3ebfea8d5.zip
Diffstat (limited to 'src/video_core/shader_environment.h')
-rw-r--r--src/video_core/shader_environment.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/video_core/shader_environment.h b/src/video_core/shader_environment.h
index 6640e53d0..aae762b27 100644
--- a/src/video_core/shader_environment.h
+++ b/src/video_core/shader_environment.h
@@ -57,6 +57,8 @@ public:
[[nodiscard]] u64 CalculateHash() const;
+ void Dump(u64 hash) override;
+
void Serialize(std::ofstream& file) const;
protected:
@@ -82,6 +84,7 @@ protected:
u32 cached_lowest = std::numeric_limits<u32>::max();
u32 cached_highest = 0;
+ u32 initial_offset = 0;
bool has_unbound_instructions = false;
};
@@ -149,6 +152,8 @@ public:
[[nodiscard]] std::array<u32, 3> WorkgroupSize() const override;
+ void Dump(u64 hash) override;
+
private:
std::unique_ptr<u64[]> code;
std::unordered_map<u32, Shader::TextureType> texture_types;
@@ -159,6 +164,7 @@ private:
u32 texture_bound{};
u32 read_lowest{};
u32 read_highest{};
+ u32 initial_offset{};
};
void SerializePipeline(std::span<const char> key, std::span<const GenericEnvironment* const> envs,