mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc
This commit is contained in:
@ -38,7 +38,8 @@ bool SWRenderer::IsHeadless() const
|
||||
return m_window->IsHeadless();
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractTexture> SWRenderer::CreateTexture(const TextureConfig& config)
|
||||
std::unique_ptr<AbstractTexture> SWRenderer::CreateTexture(const TextureConfig& config,
|
||||
[[maybe_unused]] std::string_view name)
|
||||
{
|
||||
return std::make_unique<SWTexture>(config);
|
||||
}
|
||||
@ -78,13 +79,15 @@ public:
|
||||
};
|
||||
|
||||
std::unique_ptr<AbstractShader>
|
||||
SWRenderer::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source)
|
||||
SWRenderer::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source,
|
||||
[[maybe_unused]] std::string_view name)
|
||||
{
|
||||
return std::make_unique<SWShader>(stage);
|
||||
}
|
||||
|
||||
std::unique_ptr<AbstractShader> SWRenderer::CreateShaderFromBinary(ShaderStage stage,
|
||||
const void* data, size_t length)
|
||||
std::unique_ptr<AbstractShader>
|
||||
SWRenderer::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length,
|
||||
[[maybe_unused]] std::string_view name)
|
||||
{
|
||||
return std::make_unique<SWShader>(stage);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
@ -20,7 +21,8 @@ public:
|
||||
|
||||
bool IsHeadless() const override;
|
||||
|
||||
std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config) override;
|
||||
std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config,
|
||||
std::string_view name) override;
|
||||
std::unique_ptr<AbstractStagingTexture>
|
||||
CreateStagingTexture(StagingTextureType type, const TextureConfig& config) override;
|
||||
std::unique_ptr<AbstractFramebuffer>
|
||||
@ -28,10 +30,11 @@ public:
|
||||
|
||||
void BindBackbuffer(const ClearColor& clear_color = {}) override;
|
||||
|
||||
std::unique_ptr<AbstractShader> CreateShaderFromSource(ShaderStage stage,
|
||||
std::string_view source) override;
|
||||
std::unique_ptr<AbstractShader> CreateShaderFromSource(ShaderStage stage, std::string_view source,
|
||||
std::string_view name) override;
|
||||
std::unique_ptr<AbstractShader> CreateShaderFromBinary(ShaderStage stage, const void* data,
|
||||
size_t length) override;
|
||||
size_t length,
|
||||
std::string_view name) override;
|
||||
std::unique_ptr<NativeVertexFormat>
|
||||
CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
|
||||
std::unique_ptr<AbstractPipeline> CreatePipeline(const AbstractPipelineConfig& config,
|
||||
|
Reference in New Issue
Block a user