diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2021-08-28 00:30:05 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2021-08-30 13:47:48 -0500 |
| commit | 1f2f5053735b4e94dac29237e9482befd9a2687b (patch) | |
| tree | dfe18ba017a6cda4a79c01c10431c7c37e8f74a3 /Source/Core/VideoBackends/Null | |
| parent | 9b83cf3e7fdf6fc4d15b78193461fd1081d61008 (diff) | |
VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc
Diffstat (limited to 'Source/Core/VideoBackends/Null')
| -rw-r--r-- | Source/Core/VideoBackends/Null/NullRender.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Null/NullRender.h | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/Null/NullRender.cpp b/Source/Core/VideoBackends/Null/NullRender.cpp index 0fe65aef0b..9c87ed8529 100644 --- a/Source/Core/VideoBackends/Null/NullRender.cpp +++ b/Source/Core/VideoBackends/Null/NullRender.cpp @@ -28,7 +28,8 @@ bool Renderer::IsHeadless() const return true; } -std::unique_ptr<AbstractTexture> Renderer::CreateTexture(const TextureConfig& config) +std::unique_ptr<AbstractTexture> Renderer::CreateTexture(const TextureConfig& config, + [[maybe_unused]] std::string_view name) { return std::make_unique<NullTexture>(config); } @@ -46,13 +47,15 @@ public: }; std::unique_ptr<AbstractShader> -Renderer::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source) +Renderer::CreateShaderFromSource(ShaderStage stage, [[maybe_unused]] std::string_view source, + [[maybe_unused]] std::string_view name) { return std::make_unique<NullShader>(stage); } -std::unique_ptr<AbstractShader> Renderer::CreateShaderFromBinary(ShaderStage stage, - const void* data, size_t length) +std::unique_ptr<AbstractShader> +Renderer::CreateShaderFromBinary(ShaderStage stage, const void* data, size_t length, + [[maybe_unused]] std::string_view name) { return std::make_unique<NullShader>(stage); } diff --git a/Source/Core/VideoBackends/Null/NullRender.h b/Source/Core/VideoBackends/Null/NullRender.h index f0d78bf543..f14484d3bc 100644 --- a/Source/Core/VideoBackends/Null/NullRender.h +++ b/Source/Core/VideoBackends/Null/NullRender.h @@ -15,16 +15,18 @@ 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> CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment) 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, |
