mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-15 18:25:49 +00:00
Fix some draw naming issues, make sure to print IDs for resource naming
* We don't want to bake in load-time names, we want to print IDs since then they can be linked like anything else to the resource inspector.
This commit is contained in:
@@ -5330,23 +5330,15 @@ bool WrappedID3D11DeviceContext::Serialise_CopySubresourceRegion(
|
||||
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
std::string dstName = GetDebugName(pDstResource);
|
||||
std::string srcName = GetDebugName(pSrcResource);
|
||||
|
||||
ResourceId dstLiveID = GetIDForResource(pDstResource);
|
||||
ResourceId srcLiveID = GetIDForResource(pSrcResource);
|
||||
ResourceId dstOrigID = GetResourceManager()->GetOriginalID(dstLiveID);
|
||||
ResourceId srcOrigID = GetResourceManager()->GetOriginalID(srcLiveID);
|
||||
|
||||
if(dstName == "")
|
||||
dstName = ToStr(dstOrigID);
|
||||
if(srcName == "")
|
||||
srcName = ToStr(srcOrigID);
|
||||
|
||||
AddEvent();
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = "CopySubresourceRegion(" + dstName + ", " + srcName + ")";
|
||||
draw.name = "CopySubresourceRegion(" + ToStr(dstOrigID) + ", " + ToStr(srcOrigID) + ")";
|
||||
draw.flags |= DrawFlags::Copy;
|
||||
|
||||
if(pDstResource && pSrcResource)
|
||||
@@ -5483,23 +5475,15 @@ bool WrappedID3D11DeviceContext::Serialise_CopyResource(SerialiserType &ser,
|
||||
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
std::string dstName = GetDebugName(pDstResource);
|
||||
std::string srcName = GetDebugName(pSrcResource);
|
||||
|
||||
ResourceId dstLiveID = GetIDForResource(pDstResource);
|
||||
ResourceId srcLiveID = GetIDForResource(pSrcResource);
|
||||
ResourceId dstOrigID = GetResourceManager()->GetOriginalID(dstLiveID);
|
||||
ResourceId srcOrigID = GetResourceManager()->GetOriginalID(srcLiveID);
|
||||
|
||||
if(dstName == "")
|
||||
dstName = ToStr(dstOrigID);
|
||||
if(srcName == "")
|
||||
srcName = ToStr(srcOrigID);
|
||||
|
||||
AddEvent();
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = "CopyResource(" + dstName + ", " + srcName + ")";
|
||||
draw.name = "CopyResource(" + ToStr(dstOrigID) + ", " + ToStr(srcOrigID) + ")";
|
||||
draw.flags |= DrawFlags::Copy;
|
||||
|
||||
if(pDstResource && pSrcResource)
|
||||
@@ -5999,23 +5983,15 @@ bool WrappedID3D11DeviceContext::Serialise_ResolveSubresource(SerialiserType &se
|
||||
|
||||
if(IsLoading(m_State))
|
||||
{
|
||||
std::string dstName = GetDebugName(pDstResource);
|
||||
std::string srcName = GetDebugName(pSrcResource);
|
||||
|
||||
ResourceId dstLiveID = GetIDForResource(pDstResource);
|
||||
ResourceId srcLiveID = GetIDForResource(pSrcResource);
|
||||
ResourceId dstOrigID = GetResourceManager()->GetOriginalID(dstLiveID);
|
||||
ResourceId srcOrigID = GetResourceManager()->GetOriginalID(srcLiveID);
|
||||
|
||||
if(dstName == "")
|
||||
dstName = ToStr(dstOrigID);
|
||||
if(srcName == "")
|
||||
srcName = ToStr(srcOrigID);
|
||||
|
||||
AddEvent();
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = "ResolveSubresource(" + dstName + ", " + srcName + ")";
|
||||
draw.name = "ResolveSubresource(" + ToStr(dstOrigID) + ", " + ToStr(srcOrigID) + ")";
|
||||
draw.flags |= DrawFlags::Resolve;
|
||||
|
||||
if(pDstResource && pSrcResource)
|
||||
@@ -6106,15 +6082,12 @@ bool WrappedID3D11DeviceContext::Serialise_GenerateMips(SerialiserType &ser,
|
||||
EventUsage(m_CurEventID, ResourceUsage::GenMips, view->GetResourceID()));
|
||||
}
|
||||
|
||||
std::string resName = GetDebugName(pShaderResourceView);
|
||||
|
||||
if(resName == "")
|
||||
resName = ToStr(GetResourceManager()->GetOriginalID(GetIDForResource(pShaderResourceView)));
|
||||
|
||||
AddEvent();
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = "GenerateMips(" + resName + ")";
|
||||
draw.name =
|
||||
"GenerateMips(" +
|
||||
ToStr(GetResourceManager()->GetOriginalID(GetIDForResource(pShaderResourceView))) + ")";
|
||||
draw.flags |= DrawFlags::GenMips;
|
||||
|
||||
AddDrawcall(draw, true);
|
||||
|
||||
@@ -741,7 +741,7 @@ bool WrappedOpenGL::Serialise_glGenerateTextureMipmapEXT(SerialiserType &ser, GL
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = StringFormat::Fmt(
|
||||
"%s(%llu)", ToStr(gl_CurChunk).c_str(),
|
||||
"%s(%s)", ToStr(gl_CurChunk).c_str(),
|
||||
ToStr(GetResourceManager()->GetOriginalID(GetResourceManager()->GetID(texture))).c_str());
|
||||
draw.flags |= DrawFlags::GenMips;
|
||||
|
||||
@@ -884,7 +884,7 @@ bool WrappedOpenGL::Serialise_glCopyImageSubData(SerialiserType &ser, GLuint src
|
||||
ResourceId dstid = GetResourceManager()->GetID(dstName);
|
||||
|
||||
DrawcallDescription draw;
|
||||
draw.name = StringFormat::Fmt("%s(%llu, %llu)", ToStr(gl_CurChunk).c_str(),
|
||||
draw.name = StringFormat::Fmt("%s(%s, %s)", ToStr(gl_CurChunk).c_str(),
|
||||
ToStr(GetResourceManager()->GetOriginalID(srcid)).c_str(),
|
||||
ToStr(GetResourceManager()->GetOriginalID(dstid)).c_str());
|
||||
draw.flags |= DrawFlags::Copy;
|
||||
|
||||
Reference in New Issue
Block a user