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

DEVICE_REMOVAL_PROCESS_AT_FAULT because DXGI_ERROR_DEVICE_HUNG on W10 with HD 4600 #4007

Closed
sdasda7777 opened this issue Aug 6, 2023 · 18 comments · Fixed by #4709
Closed
Labels
backend: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it

Comments

@sdasda7777
Copy link

sdasda7777 commented Aug 6, 2023

Description
Hi, I'm getting this error when running Bevy's breakout demo. A window shows up for a second or two, then disappears. I assume the error is something to do with wgpu, since most of the output seems to originate from it.

PS C:\Users\sdasda7777\Desktop\bevy> cargo run --example breakout
    Finished dev [unoptimized + debuginfo] target(s) in 8.11s
     Running `target\debug\examples\breakout.exe`
2023-08-06T11:04:54.926997Z  INFO bevy_winit::system: Creating new window "Bevy App" (0v0)
2023-08-06T11:04:55.436293Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) HD Graphics 4600", vendor: 32902, device: 1042, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12 }
2023-08-06T11:04:56.280757Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 10 Pro", kernel: "19045", cpu: "Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz", core_count: "4", memory: "27.9 GiB" }
2023-08-06T11:04:57.845688Z ERROR wgpu_hal::auxil::dxgi::exception: ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]
2023-08-06T11:04:57.848850Z ERROR wgpu_hal::auxil::dxgi::result: Buffer creation failed: 0x887A0005
2023-08-06T11:04:57.849126Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
2023-08-06T11:04:57.849617Z ERROR wgpu_hal::auxil::dxgi::result: Buffer creation failed: 0x887A0005
thread 'Compute Task Pool (1)' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\sdasda7777\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `bevy_render::globals::prepare_globals_buffer`!
2023-08-06T11:04:57.855172Z ERROR wgpu_hal::auxil::dxgi::result: Buffer creation failed: 0x887A0005
2023-08-06T11:04:57.855323Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (0)' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\sdasda7777\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
Encountered a panic in system `bevy_pbr::render::mesh::prepare_skinned_meshes`!
2023-08-06T11:04:57.859215Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
2023-08-06T11:04:57.860080Z ERROR wgpu_hal::auxil::dxgi::result: Buffer creation failed: 0x887A0005
thread 'Compute Task Pool (1)' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\sdasda7777\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
Encountered a panic in system `bevy_ui::render::prepare_uinodes`!
2023-08-06T11:04:57.863386Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
2023-08-06T11:04:57.864081Z ERROR wgpu_hal::auxil::dxgi::result: Buffer creation failed: 0x887A0005
thread 'Compute Task Pool (0)' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\sdasda7777\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
Encountered a panic in system `bevy_pbr::render::fog::prepare_fog`!
2023-08-06T11:04:57.866532Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (1)' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\sdasda7777\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
Encountered a panic in system `bevy_render::extract_component::prepare_uniform_components<bevy_sprite::mesh2d::mesh::Mesh2dUniform>`!
thread 'Compute Task Pool (1)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', crates\bevy_render\src\pipelined_rendering.rs:135:45
error: process didn't exit successfully: `target\debug\examples\breakout.exe` (exit code: 101)

Repro steps
I ran the cargo run command on the latest branch of Bevy. I assume either my hardware isn't supported, or perhaps it's some software not being present on my computer.

Expected vs observed behavior
I'm mainly just unsure what is the issue. Could you clarify whether it's that my GPU is unsupported, or it's just a bug? The error isn't very clear about what the case is 😅

Platform
Windows 10, wgpu seems to be v0.16.3

@teoxoy
Copy link
Member

teoxoy commented Aug 7, 2023

See #3604 (comment).

I don't know why they are still advertised as supporting dx12.

@teoxoy teoxoy added external: driver-bug A driver is causing the bug, though we may still want to work around it backend: dx12 Issues with DX12 or DXGI labels Aug 7, 2023
@teoxoy
Copy link
Member

teoxoy commented Aug 7, 2023

Looking at the release notes for the driver version 15.40.44.5107 those iGPUs are still listed as supporting dx12 contrary to my reading of https://www.intel.com/content/www/us/en/support/articles/000057520/graphics.html (or do they mean versions higher than 15.40.44.5107 but not including?).

The next version 15.40.45.5126 correctly advertises them as supporting 11.1.

Can you let us know which driver version you have?
Also looping in @Canvas02 (the reporter of the other issue) with the same question.

@Canvas02
Copy link

Canvas02 commented Aug 7, 2023

Can you let us know which driver version you have?
Also looping in @Canvas02 (the reporter of the other issue) with the same question.

Based on task manager it's
Version: 20.19.15.5171
Date: 4/11/2020 (November)
DirectX version: 12 (FL 11.1)

Edit: Same thing on GPU-Z

@teoxoy
Copy link
Member

teoxoy commented Aug 7, 2023

That seems to map to 15.40.48.5171 which is the latest version (not sure why there are 2 kinds of versions; if you click on the readme on the page I linked it's listed as 20.19.15.5171 instead).

Since you are on the latest version, are you still seeing this issue or is the iGPU now no longer selected by wgpu?

@Canvas02
Copy link

Canvas02 commented Aug 7, 2023

Since you are on the latest version, are you still seeing this issue or is the iGPU now no longer selected by wgpu?

In some examples yes, other no.
For example, WGPU's Skybox example works, So does Bevy's breakout,
but iced's stopwatch doesn't work, maybe for a different reason, here's the backtrace:

~/Code/_github.com/iced-rs/iced/examples/stopwatch > RUST_BACKTRACE=1 cargo r                     08/07/2023 05:26:57 PM
    Finished dev [unoptimized + debuginfo] target(s) in 4.58s
     Running `C:\Users\shatn\.cargo-target\debug\stopwatch.exe`
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Queue::write_buffer
    Parent device is lost

', C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:3019:5
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\std\src\panicking.rs:593
   1: core::panicking::panic_fmt
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library\core\src\panicking.rs:67
   2: wgpu::backend::direct::default_error_handler
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:3019
   3: core::ops::function::Fn::call<void (*)(enum2$<wgpu::Error>),tuple$<enum2$<wgpu::Error> > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:79
   4: alloc::boxed::impl$49::call<tuple$<enum2$<wgpu::Error> >,dyn$<wgpu::UncapturedErrorHandler<assoc$<Output,tuple$<> > > >,alloc::alloc::Global>
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\alloc\src\boxed.rs:1999
   5: wgpu::backend::direct::ErrorSinkRaw::handle_error
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:3005
   6: wgpu::backend::direct::Context::handle_error<enum2$<wgpu_core::device::queue::QueueWriteError> >
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:287
   7: wgpu::backend::direct::Context::handle_error_nolabel<enum2$<wgpu_core::device::queue::QueueWriteError> >
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:299
   8: wgpu::backend::direct::impl$7::queue_write_buffer
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\backend\direct.rs:2115
   9: wgpu::context::impl$5::queue_write_buffer<wgpu::backend::direct::Context>
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\context.rs:2814
  10: wgpu::Queue::write_buffer
             at C:\Users\shatn\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.1\src\lib.rs:3926
  11: iced_wgpu::quad::Layer::prepare
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\wgpu\src\quad.rs:199
  12: iced_wgpu::quad::Pipeline::prepare
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\wgpu\src\quad.rs:89
  13: iced_wgpu::backend::Backend::prepare
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\wgpu\src\backend.rs:141
  14: iced_wgpu::backend::Backend::present<alloc::string::String>
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\wgpu\src\backend.rs:95
  15: iced_wgpu::window::compositor::present<enum2$<iced_style::theme::Theme>,alloc::string::String>
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\wgpu\src\window\compositor.rs:176
  16: iced_renderer::compositor::impl$0::present::closure$1<enum2$<iced_style::theme::Theme>,alloc::string::String>
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\renderer\src\compositor.rs:124
  17: iced_graphics::renderer::Renderer<iced_wgpu::backend::Backend,enum2$<iced_style::theme::Theme> >::with_primitives<iced_wgpu::backend::Backend,enum2$<iced_style::theme::Theme>,enum2$<core::result::Result<tuple$<>,iced_graphics::compositor::SurfaceError> >,
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\graphics\src\renderer.rs:51
  18: iced_renderer::compositor::impl$0::present<enum2$<iced_style::theme::Theme>,alloc::string::String>
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\renderer\src\compositor.rs:123
  19: iced_winit::application::run_instance::async_fn$0<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_renderer::compositor::Compositor<enum2$<iced_style::theme::Theme> > > >
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\winit\src\application.rs:534
  20: iced_winit::application::run::closure$1<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_renderer::compositor::Compositor<enum2$<iced_style::theme::Theme> > > >
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\winit\src\application.rs:251
  21: winit::platform_impl::platform::event_loop::impl$3::run_return::closure$0<enum2$<stopwatch::Message>,iced_winit::application::run::closure_env$1<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_re
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:260
  22: alloc::boxed::impl$48::call_mut<tuple$<enum2$<winit::event::Event<enum2$<stopwatch::Message> > >,ref_mut$<enum2$<winit::event_loop::ControlFlow> > >,dyn$<core::ops::function::FnMut<tuple$<enum2$<winit::event::Event<enum2$<stopwatch::Message> > >,ref_mut$<
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\alloc\src\boxed.rs:1992
  23: winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure$0<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:250
  24: core::panic::unwind_safe::impl$23::call_once<tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<stopwatch::Message> > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\panic\unwind_safe.rs:271
  25: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<stopwatch::Message> > >,tuple$<> >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:500
  26: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >,isize>
  27: std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<stopwatch::Message> > > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:464
  28: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<stopwatch::Message> > >,tuple$<> >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panic.rs:142
  29: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::catch_unwind<enum2$<stopwatch::Message>,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<stopwat
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:157
  30: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::call_event_handler<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:242
  31: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::send_event<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:215
  32: winit::platform_impl::platform::event_loop::WindowData<enum2$<stopwatch::Message> >::send_event<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:142
  33: winit::platform_impl::platform::event_loop::public_window_callback_inner::closure$0<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:1125
  34: core::ops::function::FnOnce::call_once<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Message> >,tuple$<> >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:250
  35: core::panic::unwind_safe::impl$23::call_once<isize,winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Message> > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\panic\unwind_safe.rs:271
  36: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Message> > >,isize>
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:500
  37: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >,isize>
  38: std::panicking::try<isize,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Message> > > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:464
  39: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Message> > >,isize>
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panic.rs:142
  40: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::catch_unwind<enum2$<stopwatch::Message>,isize,winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<stopwatch::Messa
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:157
  41: winit::platform_impl::platform::event_loop::public_window_callback_inner<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:2320
  42: winit::platform_impl::platform::event_loop::public_window_callback<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:994
  43: CallWindowProcW
  44: DispatchMessageW
  45: SendMessageTimeoutW
  46: KiUserCallbackDispatcher
  47: NtUserDispatchMessage
  48: DispatchMessageW
  49: winit::platform_impl::platform::event_loop::flush_paint_messages::closure$0<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:824
  50: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::owned_windows<enum2$<stopwatch::Message>,winit::platform_impl::platform::event_loop::flush_paint_messages::closure_env$0<enum2$<stopwatch::Message> > >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:195
  51: winit::platform_impl::platform::event_loop::flush_paint_messages<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:807
  52: winit::platform_impl::platform::event_loop::thread_event_target_callback::closure$0<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:2370
  53: core::ops::function::FnOnce::call_once<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> >,tuple$<> >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:250
  54: core::panic::unwind_safe::impl$23::call_once<isize,winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\panic\unwind_safe.rs:271
  55: std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >,isize>
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:500
  56: std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >,isize>
  57: std::panicking::try<isize,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > > >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panicking.rs:464
  58: std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Message> > >,isize>
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\std\src\panic.rs:142
  59: winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<stopwatch::Message> >::catch_unwind<enum2$<stopwatch::Message>,isize,winit::platform_impl::platform::event_loop::thread_event_target_callback::closure_env$0<enum2$<stopwatch::Messa
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop\runner.rs:157
  60: winit::platform_impl::platform::event_loop::thread_event_target_callback<enum2$<stopwatch::Message> >
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:2547
  61: CallWindowProcW
  62: DispatchMessageW
  63: SendMessageTimeoutW
  64: KiUserCallbackDispatcher
  65: NtUserDispatchMessage
  66: DispatchMessageW
  67: winit::platform_impl::platform::event_loop::EventLoop<enum2$<stopwatch::Message> >::run_return<enum2$<stopwatch::Message>,iced_winit::application::run::closure_env$1<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Ex
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform_impl\windows\event_loop.rs:282
  68: winit::platform::run_return::impl$0::run_return<enum2$<stopwatch::Message>,iced_winit::application::run::closure_env$1<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_renderer::compositor::Compos
             at C:\Users\shatn\.cargo\git\checkouts\winit-57d3141eaf559308\c52db20\src\platform\run_return.rs:51
  69: iced_winit::application::platform::run<enum2$<stopwatch::Message>,iced_winit::application::run::closure_env$1<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_renderer::compositor::Compositor<enum
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\winit\src\application.rs:920
  70: iced_winit::application::run<iced::application::Instance<stopwatch::Stopwatch>,iced_futures::backend::native::smol::Executor,enum2$<iced_renderer::compositor::Compositor<enum2$<iced_style::theme::Theme> > > >
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\winit\src\application.rs:226
  71: iced::application::Application::run<stopwatch::Stopwatch>
             at C:\Users\shatn\Code\_github.com\iced-rs\iced\src\application.rs:208
  72: stopwatch::main
             at .\src\main.rs:13
  73: core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,enum2$<iced::error::Error> > > (*)(),tuple$<> >
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26\library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: process didn't exit successfully: `C:\Users\shatn\.cargo-target\debug\stopwatch.exe` (exit code: 101)

@teoxoy
Copy link
Member

teoxoy commented Aug 7, 2023

Are you sure that the examples are running on DX12 on the iGPU? (try to run them with RUST_LOG=info)

The following is noted in the driver release notes. Can you let us know what those versions are ("Installed DirectX* version" & "Supported DirectX* Version")?

In the Intel® Iris™ and HD Graphics Control Panel (under Options > Options menu > Information Center),
the ’Installed DirectX* version’ refers to the operating system’s DirectX version. The Information Center’s
‘Supported DirectX* Version’ refers to the Intel Graphics Driver’s supported DirectX version. The DirectX
12 API is supported but some optional features may not be available. Applications using the DirectX 12
API should query for feature support before using specific hardware features. Please note that
DirectX12 is only supported on Windows 10 and DirectX11.3 support is also available on supported
Microsoft* operating systems.

I suspect DX12 support might still be there but the hardware might be on FL11.1 and we are missing some checks.

@Canvas02
Copy link

Canvas02 commented Aug 8, 2023

Are you sure that the examples are running on DX12 on the iGPU? (try to run them with RUST_LOG=info)

I re-ran the examples, all of them run on vulkan on the dedicated GPU

The following is noted in the driver release notes. Can you let us know what those versions are ("Installed DirectX* version" & "Supported DirectX* Version")?

Here's whats written:

Microsoft DirectX*:
Runtime Version: 12.0
Hardware-Supported Version: 11.1

@Canvas02
Copy link

Canvas02 commented Aug 8, 2023

I tried rerunning them by force using environmental variables.

bevy's breakout didin't run with the iGPU but otherwise ran fine with some warning, here's a log:
bevy_breakout_log.zip

wgpu's skybox ran with the iGPU but crashed, here's the log:
wgpu_skybox_log.zip

PS: The logs are too big so I uploaded zip files with the logs inside them as txt files

@teoxoy
Copy link
Member

teoxoy commented Aug 8, 2023

bevy's breakout didin't run with the iGPU but otherwise ran fine with some warning, here's a log: bevy_breakout_log.zip

The env variables are only guaranteed to work with wgpu's examples.

wgpu's skybox ran with the iGPU but crashed, here's the log: wgpu_skybox_log.zip

This one seems to fail with the same error.

[2023-08-08T08:25:24Z ERROR wgpu_hal::auxil::dxgi::exception] ID3D12Device::RemoveDevice: Device removal has been triggered for the following reason (DXGI_ERROR_DEVICE_HUNG: The Device took an unreasonable amount of time to execute its commands, or the hardware crashed/hung. As a result, the TDR (Timeout Detection and Recovery) mechanism has been triggered. The current Device Context was executing commands when the hang occurred. The application may want to respawn and fallback to less aggressive use of the display hardware). [ EXECUTION ERROR #232: DEVICE_REMOVAL_PROCESS_AT_FAULT]

@teoxoy
Copy link
Member

teoxoy commented Aug 8, 2023

So, I'm starting to think that FL12 functionality got deprecated for those iGPUs but they should still work since we should be supporting FL11.1.

The error seems to always happen at buffer creation.

@cwfitzgerald do you think we might be trying to use some functionality that's not available on FL11.1?

@teoxoy
Copy link
Member

teoxoy commented Aug 8, 2023

Also found #1319 & #849 which seem related.

kvark's comment #849 (comment) suggests getting more logs via DebugView or through Visual Studio (see https://github.com/gfx-rs/gfx/wiki/Debugging-D3D#log).

@Canvas02
Copy link

Canvas02 commented Aug 8, 2023

I reran the skybox example with both VS and DebugView, here are the logs:

wgpu_skybox_log_DebugView.zip
wgpu_skybox_log_VisualStudio.zip

The zip files contain 2 files. One of them is the rust log, the other is the VS/DebugView ouput

Edit: I just realized that some errors in the VS output are not related to the program, idk how they got in

@teoxoy
Copy link
Member

teoxoy commented Aug 9, 2023

It doesn't look like there is anything new in those logs. Not sure what to do next...

We might end up fixing this in our quest for #2719.

I will add it in the "There are some driver issues that we may not be able to fix, but we should keep in mind:" section for now.

@sdasda7777
Copy link
Author

Hi, I don't know where to set the version of wgpu, so I unfortunately don't think I can test this atm, but could you please clarify what is the expected behaviour after this PR?

@teoxoy
Copy link
Member

teoxoy commented Nov 17, 2023

Haswell iGPUs will no longer show up in the adapters list instead of erroring with "device is lost" whenever any operation is ran on them.

@sdasda7777
Copy link
Author

Okay, I see, but what is the larger picture? Does that mean that wgpu and by proxy Bevy will not support these iGPUs?

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Nov 17, 2023

They will fall back to our OpenGL support.

@sdasda7777
Copy link
Author

Ah, okay, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: dx12 Issues with DX12 or DXGI external: driver-bug A driver is causing the bug, though we may still want to work around it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants