summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp8
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.h30
2 files changed, 10 insertions, 28 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index 36035d0d2..9184a1287 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -193,15 +193,13 @@ public:
193 ShaderEntries GetShaderEntries() const { 193 ShaderEntries GetShaderEntries() const {
194 ShaderEntries entries; 194 ShaderEntries entries;
195 for (const auto& cbuf : ir.GetConstantBuffers()) { 195 for (const auto& cbuf : ir.GetConstantBuffers()) {
196 entries.const_buffers.emplace_back(cbuf.second, stage, GetConstBufferBlock(cbuf.first), 196 entries.const_buffers.emplace_back(cbuf.second, stage, cbuf.first);
197 cbuf.first);
198 } 197 }
199 for (const auto& sampler : ir.GetSamplers()) { 198 for (const auto& sampler : ir.GetSamplers()) {
200 entries.samplers.emplace_back(sampler, stage, GetSampler(sampler)); 199 entries.samplers.emplace_back(sampler, stage);
201 } 200 }
202 for (const auto& gmem : ir.GetGlobalMemoryBases()) { 201 for (const auto& gmem : ir.GetGlobalMemoryBases()) {
203 entries.global_memory_entries.emplace_back(gmem.cbuf_index, gmem.cbuf_offset, stage, 202 entries.global_memory_entries.emplace_back(gmem.cbuf_index, gmem.cbuf_offset, stage);
204 GetGlobalMemoryBlock(gmem));
205 } 203 }
206 entries.clip_distances = ir.GetClipDistances(); 204 entries.clip_distances = ir.GetClipDistances();
207 entries.shader_length = ir.GetLength(); 205 entries.shader_length = ir.GetLength();
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.h b/src/video_core/renderer_opengl/gl_shader_decompiler.h
index a5bdbaf7a..398be13d6 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.h
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.h
@@ -5,6 +5,7 @@
5#pragma once 5#pragma once
6 6
7#include <array> 7#include <array>
8#include <set>
8#include <string> 9#include <string>
9#include <utility> 10#include <utility>
10#include <vector> 11#include <vector>
@@ -23,12 +24,8 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs;
23class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer { 24class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer {
24public: 25public:
25 explicit ConstBufferEntry(const VideoCommon::Shader::ConstBuffer& entry, 26 explicit ConstBufferEntry(const VideoCommon::Shader::ConstBuffer& entry,
26 Maxwell::ShaderStage stage, const std::string& name, u32 index) 27 Maxwell::ShaderStage stage, u32 index)
27 : VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, name{name}, index{index} {} 28 : VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, index{index} {}
28
29 const std::string& GetName() const {
30 return name;
31 }
32 29
33 Maxwell::ShaderStage GetStage() const { 30 Maxwell::ShaderStage GetStage() const {
34 return stage; 31 return stage;
@@ -39,35 +36,27 @@ public:
39 } 36 }
40 37
41private: 38private:
42 std::string name;
43 Maxwell::ShaderStage stage{}; 39 Maxwell::ShaderStage stage{};
44 u32 index{}; 40 u32 index{};
45}; 41};
46 42
47class SamplerEntry : public VideoCommon::Shader::Sampler { 43class SamplerEntry : public VideoCommon::Shader::Sampler {
48public: 44public:
49 explicit SamplerEntry(const VideoCommon::Shader::Sampler& entry, Maxwell::ShaderStage stage, 45 explicit SamplerEntry(const VideoCommon::Shader::Sampler& entry, Maxwell::ShaderStage stage)
50 const std::string& name) 46 : VideoCommon::Shader::Sampler{entry}, stage{stage} {}
51 : VideoCommon::Shader::Sampler{entry}, stage{stage}, name{name} {}
52
53 const std::string& GetName() const {
54 return name;
55 }
56 47
57 Maxwell::ShaderStage GetStage() const { 48 Maxwell::ShaderStage GetStage() const {
58 return stage; 49 return stage;
59 } 50 }
60 51
61private: 52private:
62 std::string name;
63 Maxwell::ShaderStage stage{}; 53 Maxwell::ShaderStage stage{};
64}; 54};
65 55
66class GlobalMemoryEntry { 56class GlobalMemoryEntry {
67public: 57public:
68 explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage, 58 explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage)
69 std::string name) 59 : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage} {}
70 : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage}, name{std::move(name)} {}
71 60
72 u32 GetCbufIndex() const { 61 u32 GetCbufIndex() const {
73 return cbuf_index; 62 return cbuf_index;
@@ -77,10 +66,6 @@ public:
77 return cbuf_offset; 66 return cbuf_offset;
78 } 67 }
79 68
80 const std::string& GetName() const {
81 return name;
82 }
83
84 Maxwell::ShaderStage GetStage() const { 69 Maxwell::ShaderStage GetStage() const {
85 return stage; 70 return stage;
86 } 71 }
@@ -122,7 +107,6 @@ private:
122 u32 cbuf_index{}; 107 u32 cbuf_index{};
123 u32 cbuf_offset{}; 108 u32 cbuf_offset{};
124 Maxwell::ShaderStage stage{}; 109 Maxwell::ShaderStage stage{};
125 std::string name;
126}; 110};
127 111
128struct ShaderEntries { 112struct ShaderEntries {