diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-12-29 06:44:54 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-30 04:00:15 +0100 |
commit | 3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d (patch) | |
tree | e73cb322fea7179d4dd620438ad16290feb14b0e /src/video_core/renderer_opengl/gl_shader_decompiler.h | |
parent | video_core/GPU Implemented the GPU PFIFO puller semaphore operations. (#1908) (diff) | |
download | yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar.gz yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar.bz2 yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar.lz yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar.xz yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.tar.zst yuzu-3b84e04af1ce2f9e218e7bcf225dd3eff1ddc61d.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.h')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.h | 34 |
1 files changed, 34 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 396a560d8..e47bc3729 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.h +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h @@ -71,9 +71,43 @@ private: 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; + } + + 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; + std::vector<GlobalMemoryEntry> global_memory_entries; std::array<bool, Maxwell::NumClipDistances> clip_distances{}; std::size_t shader_length{}; }; |