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:
luckyxxl
2024-04-12 11:50:16 +02:00
committed by Baldur Karlsson
parent 7e976c04a8
commit 3c265b8ad0
2 changed files with 22 additions and 0 deletions
@@ -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++;