Skip to content

Commit

Permalink
Fix for sparse binding, when unbinding a page.
Browse files Browse the repository at this point in the history
  • Loading branch information
AWoloszyn committed Jun 7, 2018
1 parent 5e6d4f4 commit 97b118a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions gapis/api/vulkan/api/queue.api
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ cmd VkResult vkQueueBindSparse(
bindsToQueue := new!SparseMemoryBinds()
memoryBinds := bufferBindInfo.pBinds[0:bufferBindInfo.bindCount]
for k in (0 .. bufferBindInfo.bindCount) {
if !(memoryBinds[k].memory in DeviceMemories) { vkErrorInvalidDeviceMemory(memoryBinds[k].memory) }
if (memoryBinds[k].memory != as!VkDeviceMemory(0)) &&
!(memoryBinds[k].memory in DeviceMemories) {
vkErrorInvalidDeviceMemory(memoryBinds[k].memory)
}
bindsToQueue.SparseMemoryBinds[k] = memoryBinds[k]
}
queuedBinds.BufferBinds[bufferBindInfo.buffer] = bindsToQueue
Expand All @@ -281,7 +284,10 @@ cmd VkResult vkQueueBindSparse(
bindsToQueue := new!SparseMemoryBinds()
memoryBinds := opaqueBindInfo.pBinds[0:opaqueBindInfo.bindCount]
for k in (0 .. opaqueBindInfo.bindCount) {
if !(memoryBinds[k].memory in DeviceMemories) { vkErrorInvalidDeviceMemory(memoryBinds[k].memory) }
if (memoryBinds[k].memory != as!VkDeviceMemory(0)) &&
!(memoryBinds[k].memory in DeviceMemories) {
vkErrorInvalidDeviceMemory(memoryBinds[k].memory)
}
bindsToQueue.SparseMemoryBinds[k] = memoryBinds[k]
}
queuedBinds.OpaqueImageBinds[opaqueBindInfo.image] = bindsToQueue
Expand All @@ -294,7 +300,10 @@ cmd VkResult vkQueueBindSparse(
bindsToQueue := new!SparseImageMemoryBinds()
imageMemoryBinds := imageBindInfo.pBinds[0:imageBindInfo.bindCount]
for k in (0 .. imageBindInfo.bindCount) {
if !(imageMemoryBinds[k].memory in DeviceMemories) { vkErrorInvalidDeviceMemory(imageMemoryBinds[k].memory) }
if (imageMemoryBinds[k].memory != as!VkDeviceMemory(0)) &&
!(imageMemoryBinds[k].memory in DeviceMemories) {
vkErrorInvalidDeviceMemory(imageMemoryBinds[k].memory)
}
bindsToQueue.SparseImageMemoryBinds[k] = imageMemoryBinds[k]
}
queuedBinds.ImageBinds[imageBindInfo.image] = bindsToQueue
Expand Down

0 comments on commit 97b118a

Please sign in to comment.