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:
iwubcode
2021-08-28 00:30:05 -05:00
parent 9b83cf3e7f
commit 1f2f505373
32 changed files with 276 additions and 133 deletions

View File

@ -4,6 +4,7 @@
#pragma once
#include <memory>
#include <string>
#include <string_view>
#include "VideoBackends/D3D12/Common.h"
#include "VideoBackends/D3DCommon/Shader.h"
@ -18,15 +19,19 @@ public:
ID3D12PipelineState* GetComputePipeline() const { return m_compute_pipeline.Get(); }
D3D12_SHADER_BYTECODE GetD3DByteCode() const;
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode);
static std::unique_ptr<DXShader> CreateFromSource(ShaderStage stage, std::string_view source);
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode,
std::string_view name);
static std::unique_ptr<DXShader> CreateFromSource(ShaderStage stage, std::string_view source,
std::string_view name);
private:
DXShader(ShaderStage stage, BinaryData bytecode);
DXShader(ShaderStage stage, BinaryData bytecode, std::string_view name);
bool CreateComputePipeline();
ComPtr<ID3D12PipelineState> m_compute_pipeline;
std::wstring m_name;
};
} // namespace DX12