-
Notifications
You must be signed in to change notification settings - Fork 781
Fix Scratch Buffer and SBT alignment violations in RT samples #1417
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
Conversation
- Use the correct alignment for scratch buffers and SBT's.
…amples to use the correct alignment.
SaschaWillems
left a comment
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.
LGTM! Thanks for fixing this 👍🏻
|
The clang format check failed for one of the files, I've fixed it now. Is there a command I can use to trigger the builds? |
|
Due to security concerns, first time contributors can't trigger builds. I just did that. |
JoseEmilio-ARM
left a comment
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.
Tested on Android (Xiaomi 15S Pro). I get a DEVICE_LOST for Mobile NeRF, but I checked that this already happens in main too, so need to track that separately.
Thank you for the PR!
|
3 approvals - merging |
Description
Issues:
VkPhysicalDeviceAccelerationStructureProperties::minAccelerationStructureScratchOffsetAlignment. This can cause crashes if the default alignment reported byvkGetBufferMemoryRequirementsdoes not matchminAccelerationStructureScratchOffsetAlignment.shaderGroupBaseAlignment.This PR adds a way to specify the required alignment for a buffer. Internally, it updates the buffer creation code to use
vmaCreateBufferWithAlignmentinstead ofvmaCreateBufferif an alignment is specified. I only updated theBufferBuilderto allow a way to specify an alignment since the comments says the other Buffer constructor is now deprecated.The following samples have been updated to be alignment aware for scratch buffers and Shader
Testing
I did a full batch run on an AMD Radeon RX 9070XT and a Nvidia Geforce RTX 5090 on Windows. I currently don't have a setup to test other platforms.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: