diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index 6188b5c48..fc096b016 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -958,6 +958,27 @@ namespace dxvk { } + void bindBufferMemory( + const DxvkSparseBufferBindKey& key, + const DxvkSparsePageHandle& memory) { + getSparseBindSubmission().bindBufferMemory(key, memory); + } + + + void bindImageMemory( + const DxvkSparseImageBindKey& key, + const DxvkSparsePageHandle& memory) { + getSparseBindSubmission().bindImageMemory(key, memory); + } + + + void bindImageOpaqueMemory( + const DxvkSparseImageOpaqueBindKey& key, + const DxvkSparsePageHandle& memory) { + getSparseBindSubmission().bindImageOpaqueMemory(key, memory); + } + + void trackDescriptorPool( const Rc& pool, const Rc& manager) { @@ -1008,6 +1029,16 @@ namespace dxvk { return VK_NULL_HANDLE; } + DxvkSparseBindSubmission& getSparseBindSubmission() { + if (likely(m_cmd.sparseBind)) + return m_cmdSparseBinds[m_cmd.sparseCmd]; + + m_cmd.sparseBind = VK_TRUE; + m_cmd.sparseCmd = uint32_t(m_cmdSparseBinds.size()); + + return m_cmdSparseBinds.emplace_back(); + } + void endCommandBuffer(VkCommandBuffer cmdBuffer); };