-
Notifications
You must be signed in to change notification settings - Fork 73
Rewrite the ash runner #419
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
base: main
Are you sure you want to change the base?
Conversation
19159e1
to
0e10f07
Compare
Thanks for cleaning this up, I don't understand everything about this code but the parts I do understand look good. I can see you've generally improved the error handling, fixed a bunch of "FIXME" comments, etc. It would be nice to have some commit messages that are more than a single line. The "ash runner: rewrite" commit in particular changes a lot of code with zero explanation. |
* use Vulkan 1.3 * use DynamicRendering feature replacing Framebuffers * extract `MyDevice` struct containing vk initialization * decouple rendering from swapchain management * redo swapchain sync, fixes validation errors, intentionally kept basic * make rendering lazily recreate its pipeline
0e10f07
to
def7735
Compare
6597b17
to
3007d25
Compare
examples/runners/ash/src/device.rs
Outdated
let message_id_name = if callback_data.p_message_id_name.is_null() { | ||
Cow::from("") | ||
} else { | ||
unsafe { CStr::from_ptr(callback_data.p_message_id_name).to_string_lossy() } | ||
}; |
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.
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.
Thanks, I very much would! I think that section is just copied from the old runner :D
2c6bab2
to
fb61b79
Compare
Followup from #418
I've noticed that running the ash runner with debug layers enabled (
--debug-layers
) prints tons of validation errors, all of which should be considered programming errors and sort of equivalent to a runtime panic. Instead of trying to fix what is there, I decided to completely rewrite the ash runner instead, and update it to the modern Vulkan 1.3 way you'd render things.MyDevice
struct containing vk initializationMacOS: removes the
ash-molten
dependency, which means we now require MoltenVK (or the Vulkan SDK) to be installed on MacOS for the ash runner to work. The wgpu runner still works as normal, with the metal backend.Reviews
Please test this on your machine with validation layers turned on, if possible (requires the Vulkan SDK). Report back if it runs and on which OS and graphics card.
Note:
--shader=sky
: holding arrow keys should change brightness--shader=mouse
: should be animated--debug-layer
requires vulkan sdk