mirror of
				https://git.tardis.systems/mirrors/yuzu
				synced 2025-11-04 04:34:07 +01:00 
			
		
		
		
	gl_shader_decompiler: Remove name entries
This commit is contained in:
		
							parent
							
								
									8b11368671
								
							
						
					
					
						commit
						c2c5260fd7
					
				@ -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();
 | 
			
		||||
 | 
			
		||||
@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user