Adds ray tracing enablement to ContextDesc.#296
Adds ray tracing enablement to ContextDesc.#296nathansizemore wants to merge 2 commits intokvark:mainfrom
Conversation
|
Thank you for the PR! |
For sure down to debug further bc I am a small sample size and this may only effect a small number of others, but not being much of a graphics guy - I'm at the end of my knowledge bank on what else to check. Vulkan validation is basically my upper bound on debugging GPU stuffs. If you have any ideas on how I can further the understanding, down to put the time in to test. |
Updated |
kvark
left a comment
There was a problem hiding this comment.
In addition, we need to update Metal and GL backends.
In Metal, fail if the backend doesn't support RT but it was requested.
In GL, always fail if the RT was requested.
| fn default() -> Self { | ||
| Self { | ||
| presentation: false, | ||
| ray_tracing: true, |
There was a problem hiding this comment.
No need for a custom default, let's keep auto-deriving as false.
I know this will be breaking those who rely on ray tracing available by default. But it makes sense, and we aren't talking about a lot of users.
| let context = Arc::new(unsafe { gpu::Context::init(gpu::ContextDesc::default()).unwrap() }); | ||
| let context = Arc::new(unsafe { | ||
| gpu::Context::init(gpu::ContextDesc { | ||
| ray_tracing: true, |
There was a problem hiding this comment.
this example probably doesn't need ray tracing
| let context = unsafe { gpu::Context::init(gpu::ContextDesc::default()).unwrap() }; | ||
| let context = unsafe { | ||
| gpu::Context::init(gpu::ContextDesc { | ||
| ray_tracing: true, |
| let context = unsafe { | ||
| gpu::Context::init(gpu::ContextDesc { | ||
| presentation: true, | ||
| ray_tracing: true, |
Switched ContextDesc to manual Default so ray_tracing defaults to true (preserves previous behavior).
Fixes #295