Skip to content
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

Merged
merged 4 commits into from
Jun 13, 2018
Merged

Conversation

Qining
Copy link
Contributor

@Qining Qining commented Jun 12, 2018

  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

Tested with all the samples we have.

Qining added 2 commits June 12, 2018 15:52
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
@Qining Qining requested review from AWoloszyn and ben-clayton June 12, 2018 19:55
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
Copy link
Contributor

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.

Copy link
Contributor Author

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,
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2a680ed

@Qining
Copy link
Contributor Author

Qining commented Jun 13, 2018

Build passes on all three platforms, tested manually.

@Qining Qining merged commit 94a829f into google:master Jun 13, 2018
@Qining Qining deleted the fix-sparse-buffer branch October 23, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants