mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Add missing Indirect resource usage for indirect draw count buffers
The buffer containing the `uint32` draw count value for indirect draws with count was not marked as used for the respective events for the following API calls: glMultiDrawArraysIndirectCount, glMultiDrawElementsIndirectCount, vkCmdDrawIndirectCount, vkCmdDrawIndexedIndirectCount, vkCmdDrawMeshTasksIndirectCountEXT.
This commit is contained in:
committed by
Baldur Karlsson
parent
7e976c04a8
commit
3c265b8ad0
@@ -3168,6 +3168,14 @@ bool WrappedOpenGL::Serialise_glMultiDrawArraysIndirectCount(SerialiserType &ser
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
{
|
||||
GLuint buf = 0;
|
||||
GL.glGetIntegerv(eGL_PARAMETER_BUFFER_BINDING, (GLint *)&buf);
|
||||
|
||||
m_ResourceUses[GetResourceManager()->GetResID(BufferRes(GetCtx(), buf))].push_back(
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
GLintptr offs = (GLintptr)offset;
|
||||
|
||||
SDChunk *baseChunk = m_StructuredFile->chunks.back();
|
||||
@@ -3404,6 +3412,14 @@ bool WrappedOpenGL::Serialise_glMultiDrawElementsIndirectCount(SerialiserType &s
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
{
|
||||
GLuint buf = 0;
|
||||
GL.glGetIntegerv(eGL_PARAMETER_BUFFER_BINDING, (GLint *)&buf);
|
||||
|
||||
m_ResourceUses[GetResourceManager()->GetResID(BufferRes(GetCtx(), buf))].push_back(
|
||||
EventUsage(m_CurEventID, ResourceUsage::Indirect));
|
||||
}
|
||||
|
||||
GLintptr offs = (GLintptr)offset;
|
||||
|
||||
SDChunk *baseChunk = m_StructuredFile->chunks.back();
|
||||
|
||||
@@ -2999,6 +2999,8 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndirectCount(SerialiserType &ser,
|
||||
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(buffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(countBuffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
|
||||
@@ -3345,6 +3347,8 @@ bool WrappedVulkan::Serialise_vkCmdDrawIndexedIndirectCount(
|
||||
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(buffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(countBuffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
|
||||
@@ -5121,6 +5125,8 @@ bool WrappedVulkan::Serialise_vkCmdDrawMeshTasksIndirectCountEXT(
|
||||
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(buffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
actionNode.resourceUsage.push_back(make_rdcpair(
|
||||
GetResID(countBuffer), EventUsage(actionNode.action.eventId, ResourceUsage::Indirect)));
|
||||
|
||||
m_BakedCmdBufferInfo[m_LastCmdBufferID].curEventID++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user