summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-01-14 02:06:42 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-02-07 02:20:57 +0100
commitc2c5260fd74bfd62723832ab690b222b464f16cd (patch)
tree674ed848d156c7045e0c7d335abd41000fe4a803
parentgl_shader_util: Add parameter to handle retrievable programs (diff)
downloadyuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar.gz
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar.bz2
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar.lz
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar.xz
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.tar.zst
yuzu-c2c5260fd74bfd62723832ab690b222b464f16cd.zip
-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:
ShaderEntries GetShaderEntries() const {
ShaderEntries entries;
for (const auto& cbuf : ir.GetConstantBuffers()) {
- entries.const_buffers.emplace_back(cbuf.second, stage, GetConstBufferBlock(cbuf.first),
- cbuf.first);
+ entries.const_buffers.emplace_back(cbuf.second, stage, cbuf.first);
}
for (const auto& sampler : ir.GetSamplers()) {
- entries.samplers.emplace_back(sampler, stage, GetSampler(sampler));
+ entries.samplers.emplace_back(sampler, stage);
}
for (const auto& gmem : ir.GetGlobalMemoryBases()) {
- entries.global_memory_entries.emplace_back(gmem.cbuf_index, gmem.cbuf_offset, stage,
- GetGlobalMemoryBlock(gmem));
+ entries.global_memory_entries.emplace_back(gmem.cbuf_index, gmem.cbuf_offset, stage);
}
entries.clip_distances = ir.GetClipDistances();
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 @@
#pragma once
#include <array>
+#include <set>
#include <string>
#include <utility>
#include <vector>
@@ -23,12 +24,8 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs;
class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer {
public:
explicit ConstBufferEntry(const VideoCommon::Shader::ConstBuffer& entry,
- Maxwell::ShaderStage stage, const std::string& name, u32 index)
- : VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, name{name}, index{index} {}
-
- const std::string& GetName() const {
- return name;
- }
+ Maxwell::ShaderStage stage, u32 index)
+ : VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, index{index} {}
Maxwell::ShaderStage GetStage() const {
return stage;
@@ -39,35 +36,27 @@ public:
}
private:
- std::string name;
Maxwell::ShaderStage stage{};
u32 index{};
};
class SamplerEntry : public VideoCommon::Shader::Sampler {
public:
- explicit SamplerEntry(const VideoCommon::Shader::Sampler& entry, Maxwell::ShaderStage stage,
- const std::string& name)
- : VideoCommon::Shader::Sampler{entry}, stage{stage}, name{name} {}
-
- const std::string& GetName() const {
- return name;
- }
+ explicit SamplerEntry(const VideoCommon::Shader::Sampler& entry, Maxwell::ShaderStage stage)
+ : VideoCommon::Shader::Sampler{entry}, stage{stage} {}
Maxwell::ShaderStage GetStage() const {
return stage;
}
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)} {}
+ explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage)
+ : cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage} {}
u32 GetCbufIndex() const {
return cbuf_index;
@@ -77,10 +66,6 @@ public:
return cbuf_offset;
}
- const std::string& GetName() const {
- return name;
- }
-
Maxwell::ShaderStage GetStage() const {
return stage;
}
@@ -122,7 +107,6 @@ private:
u32 cbuf_index{};
u32 cbuf_offset{};
Maxwell::ShaderStage stage{};
- std::string name;
};
struct ShaderEntries {