summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.h')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.h36
1 files changed, 29 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h
index 396a560d8..0856a1361 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.h
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h
@@ -38,10 +38,6 @@ public:
return index;
}
- u32 GetHash() const {
- return (static_cast<u32>(stage) << 16) | index;
- }
-
private:
std::string name;
Maxwell::ShaderStage stage{};
@@ -62,18 +58,44 @@ public:
return stage;
}
- u32 GetHash() const {
- return (static_cast<u32>(stage) << 16) | static_cast<u32>(GetIndex());
+private:
+ std::string name;
+ Maxwell::ShaderStage stage{};
+};
+
+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;
}
private:
- std::string name;
+ u32 cbuf_index{};
+ u32 cbuf_offset{};
Maxwell::ShaderStage stage{};
+ std::string name;
};
struct ShaderEntries {
std::vector<ConstBufferEntry> const_buffers;
std::vector<SamplerEntry> samplers;
+ std::vector<GlobalMemoryEntry> global_memory_entries;
std::array<bool, Maxwell::NumClipDistances> clip_distances{};
std::size_t shader_length{};
};