mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39: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:
@ -4,6 +4,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "VideoBackends/D3D12/Common.h"
|
||||
#include "VideoBackends/D3D12/DescriptorHeapManager.h"
|
||||
@ -18,7 +20,7 @@ class DXTexture final : public AbstractTexture
|
||||
public:
|
||||
~DXTexture();
|
||||
|
||||
static std::unique_ptr<DXTexture> Create(const TextureConfig& config);
|
||||
static std::unique_ptr<DXTexture> Create(const TextureConfig& config, std::string_view name);
|
||||
static std::unique_ptr<DXTexture> CreateAdopted(ID3D12Resource* resource);
|
||||
|
||||
void Load(u32 level, u32 width, u32 height, u32 row_length, const u8* buffer,
|
||||
@ -43,7 +45,8 @@ public:
|
||||
void DestroyResource();
|
||||
|
||||
private:
|
||||
DXTexture(const TextureConfig& config, ID3D12Resource* resource, D3D12_RESOURCE_STATES state);
|
||||
DXTexture(const TextureConfig& config, ID3D12Resource* resource, D3D12_RESOURCE_STATES state,
|
||||
std::string_view name);
|
||||
|
||||
bool CreateSRVDescriptor();
|
||||
bool CreateUAVDescriptor();
|
||||
@ -52,6 +55,8 @@ private:
|
||||
DescriptorHandle m_srv_descriptor = {};
|
||||
DescriptorHandle m_uav_descriptor = {};
|
||||
|
||||
std::wstring m_name;
|
||||
|
||||
mutable D3D12_RESOURCE_STATES m_state;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user