mirror of https://github.com/PCSX2/pcsx2.git
GS: Add DX11 shaders debug names
This commit is contained in:
parent
cc441c1057
commit
9b3f088de6
|
@ -516,7 +516,7 @@ wil::com_ptr_nothrow<ID3DBlob> D3D::CompileShader(D3D::ShaderType type, D3D_FEAT
|
|||
}
|
||||
|
||||
static constexpr UINT flags_non_debug = D3DCOMPILE_OPTIMIZATION_LEVEL3;
|
||||
static constexpr UINT flags_debug = D3DCOMPILE_SKIP_OPTIMIZATION | D3DCOMPILE_DEBUG;
|
||||
static constexpr UINT flags_debug = D3DCOMPILE_SKIP_OPTIMIZATION | D3DCOMPILE_DEBUG | D3DCOMPILE_DEBUG_NAME_FOR_SOURCE;
|
||||
|
||||
wil::com_ptr_nothrow<ID3DBlob> blob;
|
||||
wil::com_ptr_nothrow<ID3DBlob> error_blob;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0+
|
||||
|
||||
#include "GS/Renderers/DX11/D3D11ShaderCache.h"
|
||||
#include "GS/Renderers/DX11/GSDevice11.h"
|
||||
#include "GS/GS.h"
|
||||
|
||||
#include "Config.h"
|
||||
|
@ -300,6 +301,12 @@ wil::com_ptr_nothrow<ID3D11VertexShader> D3D11ShaderCache::GetVertexShader(ID3D1
|
|||
return {};
|
||||
}
|
||||
|
||||
const char* shader_name = entry_point; // Ideally we'd feed in a proper name
|
||||
if (shader_name)
|
||||
{
|
||||
GSDevice11::SetD3DDebugObjectName(shader.get(), shader_name);
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
|
@ -320,6 +327,12 @@ bool D3D11ShaderCache::GetVertexShaderAndInputLayout(ID3D11Device* device, ID3D1
|
|||
return {};
|
||||
}
|
||||
|
||||
const char* shader_name = entry_point; // Ideally we'd feed in a proper name
|
||||
if (shader_name)
|
||||
{
|
||||
GSDevice11::SetD3DDebugObjectName(actual_vs.get(), shader_name);
|
||||
}
|
||||
|
||||
hr = device->CreateInputLayout(layout, layout_size, blob->GetBufferPointer(), blob->GetBufferSize(), il);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
|
@ -348,6 +361,12 @@ wil::com_ptr_nothrow<ID3D11PixelShader> D3D11ShaderCache::GetPixelShader(ID3D11D
|
|||
return {};
|
||||
}
|
||||
|
||||
const char* shader_name = entry_point; // Ideally we'd feed in a proper name
|
||||
if (shader_name)
|
||||
{
|
||||
GSDevice11::SetD3DDebugObjectName(shader.get(), shader_name);
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
|
@ -368,6 +387,12 @@ wil::com_ptr_nothrow<ID3D11ComputeShader> D3D11ShaderCache::GetComputeShader(ID3
|
|||
return {};
|
||||
}
|
||||
|
||||
const char* shader_name = entry_point; // Ideally we'd feed in a proper name
|
||||
if (shader_name)
|
||||
{
|
||||
GSDevice11::SetD3DDebugObjectName(shader.get(), shader_name);
|
||||
}
|
||||
|
||||
return shader;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue