mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-04 05:41:06 +00:00
Fix corruption when calling GetDetails() on non-shader
This commit is contained in:
@@ -294,12 +294,13 @@ TextureDescription D3D12Replay::GetTexture(ResourceId id)
|
||||
|
||||
rdcarray<ShaderEntryPoint> D3D12Replay::GetShaderEntryPoints(ResourceId shader)
|
||||
{
|
||||
WrappedID3D12Shader *sh =
|
||||
m_pDevice->GetResourceManager()->GetCurrentAs<WrappedID3D12Shader>(shader);
|
||||
ID3D12DeviceChild *res = m_pDevice->GetResourceManager()->GetCurrentResource(shader);
|
||||
|
||||
if(!sh)
|
||||
if(!res || !WrappedID3D12Shader::IsAlloc(res))
|
||||
return {};
|
||||
|
||||
WrappedID3D12Shader *sh = (WrappedID3D12Shader *)res;
|
||||
|
||||
ShaderReflection &ret = sh->GetDetails();
|
||||
|
||||
return {{"main", ret.stage}};
|
||||
|
||||
Reference in New Issue
Block a user