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

Add Buffer Device Address chapter #275

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spencer-lunarg
Copy link
Contributor

adds some more details to the technical parts of VK_KHR_buffer_device_address (mostly from the SPIR-V side, but didn't quite fit in the SPIRV-Guide scope)

chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
OpStore %ptr %obj Aligned 16
----

This will match with the `VkMemoryRequirements::alignment` used to create the memory

Choose a reason for hiding this comment

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

No, this is a promise for how aligned this specific pointer is. And for GLSL, it's derived from the buffer_reference_alignment you put in the layout() and the offset in the structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I realize this is not worded right, but this is where I get a bit loss

so I understand passes in buffer_reference_alignment to set the Aligned in SPIR-V

vkGetBufferDeviceAddress is required to be aligned with VkMemoryRequirements::alignment

... I guess how would an app know this when they are creating their shader since they won't know the VkMemoryRequirements::alignment until runtime

chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
chapters/buffer_device_address.adoc Outdated Show resolved Hide resolved
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.

3 participants