-
Notifications
You must be signed in to change notification settings - Fork 171
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
base: main
Are you sure you want to change the base?
Add Buffer Device Address chapter #275
Conversation
OpStore %ptr %obj Aligned 16 | ||
---- | ||
|
||
This will match with the `VkMemoryRequirements::alignment` used to create the memory |
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.
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.
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.
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
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)