Skip to content
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

Re-allow vk backend on Apple platforms via vulkan-portability feature #2488

Merged
merged 2 commits into from
Feb 19, 2022
Merged

Re-allow vk backend on Apple platforms via vulkan-portability feature #2488

merged 2 commits into from
Feb 19, 2022

Conversation

jinleili
Copy link
Contributor

@jinleili jinleili commented Feb 17, 2022

Connections
#2485
#2489

Description

  • Enabled VK_KHR_portability_subset extension for Apple platforms.
  • Add a vulkan-portability feature to enable vulkan backend.

Also, fixes Metal EDR wantsExtendedDynamicRangeContent setting on iOS. I'm double checked,although Apple's documentation marks it only for macOS, it cannot turn on EDR without setting it on iOS.

Testing
Tested all examples on M1 Mac, only boids crashed on vk backend, always cause my Mac reboot and no error throwed out.
Tested build to iOS and running, using wgpu-on-app.

Tested all examples on Intel Mac, also only boids crashed on vk backend, throwed these error:

Using Intel(R) UHD Graphics 630 (Vulkan)
[mvk-error] VK_ERROR_DEVICE_LOST: Command buffer 0x7febc4221040 "_Present" execution failed (code 2): Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout)
[2022-02-17T12:52:14Z ERROR wgpu_hal::vulkan::instance] GENERAL | VALIDATION | PERFORMANCE | 1111111111111111111111111111000 [ (0x0)]
        VK_ERROR_DEVICE_LOST: Command buffer 0x7febc4221040 "_Present" execution failed (code 2): Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout)
[2022-02-17T12:52:14Z ERROR wgpu_hal::vulkan::instance]         objects: (type: QUEUE, hndl: 0x600000a65a38, name: ?)
thread 'main' panicked at 'Error in Surface::get_current_texture_view: parent device is lost', wgpu/src/backend/direct.rs:231:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'Error in Device::drop: parent device is lost', wgpu/src/backend/direct.rs:231:9
[2022-02-17T12:52:14Z ERROR wgpu_core::device] failed to wait for the device: Lost

RUST_BACKTRACE=full locate crashed at surface_get_current_texture:

  14:        0x10b526d6f - core::panicking::panic_fmt::h7d73f67464d78916
                               at /rustc/db9d1b20bba1968c1ec1fc49616d4742c1725b4b/library/core/src/panicking.rs:107:14
  15:        0x10af3b26f - wgpu::backend::direct::Context::handle_error_fatal::ha1bfba91354afa64
                               at /Users/LiJinlei/Rust/forks/wgpu/wgpu/src/backend/direct.rs:231:9
  16:        0x10af49d09 - <wgpu::backend::direct::Context as wgpu::Context>::surface_get_current_texture::hc9ff54a1b7d398a9
                               at /Users/LiJinlei/Rust/forks/wgpu/wgpu/src/backend/direct.rs:970:25
  17:        0x10ae88f75 - wgpu::Surface::get_current_texture::h1b2971f40ec2a252
                               at /Users/LiJinlei/Rust/forks/wgpu/wgpu/src/lib.rs:3194:13
  18:        0x10ab6abef - boids::framework::start::{{closure}}::hfce715d591ea0581
                               at /Users/LiJinlei/Rust/forks/wgpu/wgpu/examples/boids/../framework.rs:323:35

wgpu-core/Cargo.toml Outdated Show resolved Hide resolved
@jinleili jinleili changed the title Re-allow vk backend on Apple platforms Re-allow vk backend on Apple platforms via portability feature Feb 17, 2022
@jinleili jinleili changed the title Re-allow vk backend on Apple platforms via portability feature Re-allow vk backend on Apple platforms via vulkan feature Feb 17, 2022
wgpu-core/Cargo.toml Outdated Show resolved Hide resolved
@jinleili jinleili changed the title Re-allow vk backend on Apple platforms via vulkan feature Re-allow vk backend on Apple platforms via vulkan-portability feature Feb 17, 2022
@jinleili jinleili requested a review from kvark February 18, 2022 03:41
wgpu/Cargo.toml Show resolved Hide resolved
@kvark kvark merged commit 8dd711e into gfx-rs:master Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants