summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-12-29 06:44:54 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-07 02:20:57 +0100
commit049050856f30ba68e86197ac5cac622c3770e44b (patch)
treeefe29ddc7ab9677c25302a7e3c7a7bafba411242
parentMerge pull request #2042 from ReinUsesLisp/nouveau-tex (diff)
downloadyuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar.gz
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar.bz2
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar.lz
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar.xz
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.tar.zst
yuzu-049050856f30ba68e86197ac5cac622c3770e44b.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h
index 0856a1361..a5bdbaf7a 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.h
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h
@@ -92,6 +92,39 @@ private:
std::string name;
};
+class GlobalMemoryEntry {
+public:
+ explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage,
+ std::string name)
+ : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage}, name{std::move(name)} {}
+
+ u32 GetCbufIndex() const {
+ return cbuf_index;
+ }
+
+ u32 GetCbufOffset() const {
+ return cbuf_offset;
+ }
+
+ const std::string& GetName() const {
+ return name;
+ }
+
+ Maxwell::ShaderStage GetStage() const {
+ return stage;
+ }
+
+ u32 GetHash() const {
+ return (static_cast<u32>(stage) << 24) | (cbuf_index << 16) | cbuf_offset;
+ }
+
+private:
+ u32 cbuf_index{};
+ u32 cbuf_offset{};
+ Maxwell::ShaderStage stage{};
+ std::string name;
+};
+
struct ShaderEntries {
std::vector<ConstBufferEntry> const_buffers;
std::vector<SamplerEntry> samplers;