Skip to content
This repository was archived by the owner on Jun 18, 2021. It is now read-only.
This repository was archived by the owner on Jun 18, 2021. It is now read-only.

macOS: "acquire_image failed, re-creating"  #74

Closed
@parasyte

Description

@parasyte

Running any example on macOS with RUST_LOG=info logs the following warnings, followed by a panic.

[2019-08-31T07:23:56Z INFO  shadow::framework] Initializing the window...
[2019-08-31T07:23:56Z INFO  wgpu_native::instance] Adapter Metal AdapterInfo { name: "Intel(R) HD Graphics 630", vendor: 0, device: 0, device_type: IntegratedGpu }
[2019-08-31T07:23:56Z INFO  wgpu_native::device] creating swap chain SwapChainDescriptor { usage: OUTPUT_ATTACHMENT, format: Bgra8UnormSrgb, width: 1600, height: 1200, present_mode: Vsync }
[2019-08-31T07:23:56Z INFO  gfx_backend_metal::window] build_swapchain SwapchainConfig { present_mode: Fifo, composite_alpha: OPAQUE, format: Bgra8Srgb, extent: Extent2D { width: 1600, height: 1200 }, image_count: 2, image_layers: 1, image_usage: COLOR_ATTACHMENT }
[2019-08-31T07:23:56Z INFO  shadow::framework] Initializing the example...
[2019-08-31T07:23:57Z INFO  gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-08-31T07:23:57Z INFO  gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-08-31T07:23:57Z INFO  gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Vertex, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-08-31T07:23:57Z INFO  gfx_backend_metal::device] Entry point EntryPoint { name: "main", execution_model: Fragment, work_group_size: WorkGroupSize { x: 0, y: 0, z: 0 } }
[2019-08-31T07:23:57Z INFO  shadow::framework] Entering render loop...
[2019-08-31T07:23:58Z WARN  gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 0
[2019-08-31T07:23:58Z WARN  gfx_backend_metal::window] Failed to get the drawable of frame 0
[2019-08-31T07:23:58Z WARN  wgpu_native::swap_chain] present failed: OutOfDate
[2019-08-31T07:23:58Z WARN  gfx_backend_metal::window] Swapchain drawables are changed, unable to wait for 1
[2019-08-31T07:23:58Z WARN  gfx_backend_metal::window] Failed to get the drawable of frame 1
[2019-08-31T07:23:58Z WARN  wgpu_native::swap_chain] present failed: OutOfDate
[2019-08-31T07:23:58Z WARN  gfx_backend_metal::window] No frame is available
[2019-08-31T07:23:58Z WARN  wgpu_native::swap_chain] acquire_image failed, re-creating
thread 'main' panicked at 'not yet implemented', /Users/parasyte/.cargo/git/checkouts/wgpu-53e70f8674b08dd4/b58c96e/wgpu-native/src/swap_chain.rs:132:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

I can get around the panic by updating the wgpu-native commit hash to gfx-rs/wgpu#314 But I still get the acquire_image failed warning quite often. Sometimes the renderer gives up and I get a seizure-inducing red/black flash at full frame rate. When it does work (rarely, meaning no acquire_image failed warning), the animation on the shadow example is much slower than it used to be (similar to #72). It's slow, but it doesn't use excessive amounts of CPU or anything.

FWIW I bisected this back to #70. Prior to this patch, everything is stable and solid. Haven't seen any warnings with this build at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions