Explorar o código

gl_shader_decompiler: Remove name entries

ReinUsesLisp %!s(int64=7) %!d(string=hai) anos
pai
achega
c2c5260fd7

+ 3 - 5
src/video_core/renderer_opengl/gl_shader_decompiler.cpp

@@ -193,15 +193,13 @@ public:
     ShaderEntries GetShaderEntries() const {
     ShaderEntries GetShaderEntries() const {
         ShaderEntries entries;
         ShaderEntries entries;
         for (const auto& cbuf : ir.GetConstantBuffers()) {
         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()) {
         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()) {
         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.clip_distances = ir.GetClipDistances();
         entries.shader_length = ir.GetLength();
         entries.shader_length = ir.GetLength();

+ 7 - 23
src/video_core/renderer_opengl/gl_shader_decompiler.h

@@ -5,6 +5,7 @@
 #pragma once
 #pragma once
 
 
 #include <array>
 #include <array>
+#include <set>
 #include <string>
 #include <string>
 #include <utility>
 #include <utility>
 #include <vector>
 #include <vector>
@@ -23,12 +24,8 @@ using Maxwell = Tegra::Engines::Maxwell3D::Regs;
 class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer {
 class ConstBufferEntry : public VideoCommon::Shader::ConstBuffer {
 public:
 public:
     explicit ConstBufferEntry(const VideoCommon::Shader::ConstBuffer& entry,
     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 {
     Maxwell::ShaderStage GetStage() const {
         return stage;
         return stage;
@@ -39,35 +36,27 @@ public:
     }
     }
 
 
 private:
 private:
-    std::string name;
     Maxwell::ShaderStage stage{};
     Maxwell::ShaderStage stage{};
     u32 index{};
     u32 index{};
 };
 };
 
 
 class SamplerEntry : public VideoCommon::Shader::Sampler {
 class SamplerEntry : public VideoCommon::Shader::Sampler {
 public:
 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 {
     Maxwell::ShaderStage GetStage() const {
         return stage;
         return stage;
     }
     }
 
 
 private:
 private:
-    std::string name;
     Maxwell::ShaderStage stage{};
     Maxwell::ShaderStage stage{};
 };
 };
 
 
 class GlobalMemoryEntry {
 class GlobalMemoryEntry {
 public:
 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 {
     u32 GetCbufIndex() const {
         return cbuf_index;
         return cbuf_index;
@@ -77,10 +66,6 @@ public:
         return cbuf_offset;
         return cbuf_offset;
     }
     }
 
 
-    const std::string& GetName() const {
-        return name;
-    }
-
     Maxwell::ShaderStage GetStage() const {
     Maxwell::ShaderStage GetStage() const {
         return stage;
         return stage;
     }
     }
@@ -122,7 +107,6 @@ private:
     u32 cbuf_index{};
     u32 cbuf_index{};
     u32 cbuf_offset{};
     u32 cbuf_offset{};
     Maxwell::ShaderStage stage{};
     Maxwell::ShaderStage stage{};
-    std::string name;
 };
 };
 
 
 struct ShaderEntries {
 struct ShaderEntries {