-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vulkan: Fix support of sparse buffer #1972
Conversation
1) Support sparse buffer in vkCmdCopyBuffer, vkCmdFillBuffer and vkCmdCopyBufferToImage. 2) Support extract geometry data from sparse buffer 3) 'Read' the memory of sparse buffers 4) Implement doVkCmdFillBuffer
memPieces := getBufferBoundMemoryPiecesInRange(buffer, readOffset, readSize) | ||
for _, _, mp in memPieces { | ||
readCoherentMemory(mp.DeviceMemory, mp.MemoryOffset, mp.Size) | ||
// On the trace side, 'Data' pool won't actually be created, so its length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this way, since data is marked as "spy_disable" can we just not generate the read intrinsic for this case?
We already handle other cases like this, so I think cutting out the read intrinsic for spy_disabled is probably a cleaner approach than a check like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2a680ed
dstRange := VkImageSubresourceRange(r.dstSubresource.aspectMask, | ||
r.dstSubresource.mipLevel, 1, | ||
r.dstSubresource.baseArrayLayer, r.dstSubresource.layerCount) | ||
srcRange := VkImageSubresourceRange( r.srcSubresource.aspectMask, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something weird with the spacing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, looks like the format tool goes crazy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 2a680ed
Build passes on all three platforms, tested manually. |
Support sparse buffer in vkCmdCopyBuffer, vkCmdFillBuffer and
vkCmdCopyBufferToImage.
Support extract geometry data from sparse buffer
'Read' the memory of sparse buffers
Implement doVkCmdFillBuffer
Tested with all the samples we have.