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:
@ -5,6 +5,8 @@
|
||||
|
||||
#include <d3d11.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "VideoCommon/AbstractFramebuffer.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(ComPtr<ID3D11Texture2D> texture);
|
||||
|
||||
void CopyRectangleFromTexture(const AbstractTexture* src,
|
||||
@ -35,7 +37,7 @@ public:
|
||||
ID3D11UnorderedAccessView* GetD3DUAV() const { return m_uav.Get(); }
|
||||
|
||||
private:
|
||||
DXTexture(const TextureConfig& config, ComPtr<ID3D11Texture2D> texture);
|
||||
DXTexture(const TextureConfig& config, ComPtr<ID3D11Texture2D> texture, std::string_view name);
|
||||
|
||||
bool CreateSRV();
|
||||
bool CreateUAV();
|
||||
@ -43,6 +45,7 @@ private:
|
||||
ComPtr<ID3D11Texture2D> m_texture;
|
||||
ComPtr<ID3D11ShaderResourceView> m_srv;
|
||||
ComPtr<ID3D11UnorderedAccessView> m_uav;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
class DXStagingTexture final : public AbstractStagingTexture
|
||||
|
Reference in New Issue
Block a user