gfx-rs/wgpu-rs

vulkan-portability on MacOS panics

rybertm opened this issue · 5 comments

vulkan-portability = ["wgc/gfx-backend-vulkan"]
sets the gfx-backend-vulkan feature inside wgpu/wgpu-core but in this crate only vulkan-portability gets set, so when gfx_select! is expanded it checks for gfx-backend-vulkan, which is not present in wgpu-rs:
let device_id = wgc::gfx_select!(
*adapter => global.adapter_request_device(*adapter, desc, trace_dir, PhantomData)
)

As for fixing, I could add a gfx-backend-vulkan dependency to the vulkan-portability feature as well as add it to macos targets, but I don't know if it could break in other unix systems @kvark.

Originally posted by @rybertm in #575 (comment)

Looks like

vulkan-portability = ["wgc/gfx-backend-vulkan"]

broke the "vulkan-portability" feature on MacOS for the same reason stated above, quoted from the original issue.

The same fix could be applied unless there's other plans.

kvark commented

I'm thinking that, since gfx_select! isn't ever used internally by wgpu-core, the feature it should be checking should be "vulkan-portability" (instead of "gfx-backend-vulkan"), even though wgpu-core doesn't have this feature.

Not sure if i should submit a PR with that change or if you want some discussion around it or ideas

kvark commented
kvark commented

I decided to remove support for Vulkan Portability, at least for the 0.8 release.
The reason for it being - our validation is very good now, and Naga's Metal output is great. So we have very little value to extract from running with Vulkan Validation Layers at this point.