diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.h | 33 |
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: | |||
| 92 | std::string name; | 92 | std::string name; |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | class GlobalMemoryEntry { | ||
| 96 | public: | ||
| 97 | explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage, | ||
| 98 | std::string name) | ||
| 99 | : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage}, name{std::move(name)} {} | ||
| 100 | |||
| 101 | u32 GetCbufIndex() const { | ||
| 102 | return cbuf_index; | ||
| 103 | } | ||
| 104 | |||
| 105 | u32 GetCbufOffset() const { | ||
| 106 | return cbuf_offset; | ||
| 107 | } | ||
| 108 | |||
| 109 | const std::string& GetName() const { | ||
| 110 | return name; | ||
| 111 | } | ||
| 112 | |||
| 113 | Maxwell::ShaderStage GetStage() const { | ||
| 114 | return stage; | ||
| 115 | } | ||
| 116 | |||
| 117 | u32 GetHash() const { | ||
| 118 | return (static_cast<u32>(stage) << 24) | (cbuf_index << 16) | cbuf_offset; | ||
| 119 | } | ||
| 120 | |||
| 121 | private: | ||
| 122 | u32 cbuf_index{}; | ||
| 123 | u32 cbuf_offset{}; | ||
| 124 | Maxwell::ShaderStage stage{}; | ||
| 125 | std::string name; | ||
| 126 | }; | ||
| 127 | |||
| 95 | struct ShaderEntries { | 128 | struct ShaderEntries { |
| 96 | std::vector<ConstBufferEntry> const_buffers; | 129 | std::vector<ConstBufferEntry> const_buffers; |
| 97 | std::vector<SamplerEntry> samplers; | 130 | std::vector<SamplerEntry> samplers; |