[dxvk] Expose sparse binding operations as part of the command list

This commit is contained in:
Philip Rebohle 2022-08-22 21:02:29 +02:00
parent 2615af7664
commit 12d2f8a9d4
1 changed files with 31 additions and 0 deletions

View File

@ -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<DxvkDescriptorPool>& pool,
const Rc<DxvkDescriptorManager>& 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);
};