gl_shader_decompiler: Remove name entries
This commit is contained in:
parent
8b11368671
commit
c2c5260fd7
2 changed files with 10 additions and 28 deletions
|
@ -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),
|
entries.const_buffers.emplace_back(cbuf.second, stage, cbuf.first);
|
||||||
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,
|
entries.global_memory_entries.emplace_back(gmem.cbuf_index, gmem.cbuf_offset, stage);
|
||||||
GetGlobalMemoryBlock(gmem));
|
|
||||||
}
|
}
|
||||||
entries.clip_distances = ir.GetClipDistances();
|
entries.clip_distances = ir.GetClipDistances();
|
||||||
entries.shader_length = ir.GetLength();
|
entries.shader_length = ir.GetLength();
|
||||||
|
|
|
@ -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)
|
Maxwell::ShaderStage stage, u32 index)
|
||||||
: VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, name{name}, index{index} {}
|
: VideoCommon::Shader::ConstBuffer{entry}, stage{stage}, index{index} {}
|
||||||
|
|
||||||
const std::string& GetName() const {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
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,
|
explicit SamplerEntry(const VideoCommon::Shader::Sampler& entry, Maxwell::ShaderStage stage)
|
||||||
const std::string& name)
|
: VideoCommon::Shader::Sampler{entry}, stage{stage} {}
|
||||||
: VideoCommon::Shader::Sampler{entry}, stage{stage}, name{name} {}
|
|
||||||
|
|
||||||
const std::string& GetName() const {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
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,
|
explicit GlobalMemoryEntry(u32 cbuf_index, u32 cbuf_offset, Maxwell::ShaderStage stage)
|
||||||
std::string name)
|
: cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage} {}
|
||||||
: cbuf_index{cbuf_index}, cbuf_offset{cbuf_offset}, stage{stage}, name{std::move(name)} {}
|
|
||||||
|
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in a new issue