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:
@ -2,7 +2,10 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "VideoBackends/D3D/D3DBase.h"
|
||||
#include "VideoBackends/D3DCommon/Shader.h"
|
||||
@ -12,7 +15,8 @@ namespace DX11
|
||||
class DXShader final : public D3DCommon::Shader
|
||||
{
|
||||
public:
|
||||
DXShader(ShaderStage stage, BinaryData bytecode, ID3D11DeviceChild* shader);
|
||||
DXShader(ShaderStage stage, BinaryData bytecode, ID3D11DeviceChild* shader,
|
||||
std::string_view name);
|
||||
~DXShader() override;
|
||||
|
||||
ID3D11VertexShader* GetD3DVertexShader() const;
|
||||
@ -20,10 +24,12 @@ public:
|
||||
ID3D11PixelShader* GetD3DPixelShader() const;
|
||||
ID3D11ComputeShader* GetD3DComputeShader() const;
|
||||
|
||||
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode);
|
||||
static std::unique_ptr<DXShader> CreateFromBytecode(ShaderStage stage, BinaryData bytecode,
|
||||
std::string_view name);
|
||||
|
||||
private:
|
||||
ComPtr<ID3D11DeviceChild> m_shader;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
} // namespace DX11
|
||||
|
Reference in New Issue
Block a user