You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Turning on InstanceFlags::DEBUG with on the Vulkan backend on Windows creates an OOB access when compiling a shader. Doesn't crash on D3D12 or without the DEBUG flag.
Backtrace:
thread 'main' panicked at 'byte index 59 is out of bounds of ``': C:\Users\yanchith\.cargo\registry\s
rc\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\span.rs:73
thread 'main' panicked at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\span.rs:73:29:
byte index 59 is out of bounds of ``
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b/library\std\src\panicking.rs:597
1: core::panicking::panic_fmt
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b/library\core\src\panicking.rs:72
2: core::fmt::Arguments::new_v1
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b/library\core\src\fmt\mod.rs:332
3: core::str::slice_error_fail_rt
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b/library\core\src\str\mod.rs:110
4: core::str::slice_error_fail
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b/library\core\src\str\mod.rs:87
5: core::str::traits::impl$9::index
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b\library\core\src\str\traits.rs:361
6: core::str::traits::impl$4::index<core::ops::range::RangeTo<usize> >
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b\library\core\src\str\traits.rs:61
7: naga::span::Span::location
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\span.rs:73
8: naga::back::spv::BlockContext::write_block
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\back\spv\block.rs:1759
9: naga::back::spv::Writer::write_function
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\back\spv\writer.rs:711
10: naga::back::spv::Writer::write_logical_layout
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\back\spv\writer.rs:1969
11: naga::back::spv::Writer::write
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\back\spv\writer.rs:2040
12: naga::back::spv::write_vec
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\naga-0.14.0\src\back\spv\mod.rs:747
13: wgpu_hal::vulkan::Device::compile_stage
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\vulkan\device.rs:758
14: wgpu_hal::vulkan::device::impl$4::create_render_pipeline
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\vulkan\device.rs:1624
15: wgpu_core::device::resource::Device<wgpu_hal::vulkan::Api>::create_render_pipeline<wgpu_hal::vulkan::Api,wgpu_core::identity::Identity
ManagerFactory>
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-core-0.18.0\src\device\resource.rs:3119
16: wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::device_create_render_pipeline<wgpu_core::identity::IdentityMan
agerFactory,wgpu_hal::vulkan::Api>
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-core-0.18.0\src\device\global.rs:1874
17: wgpu::backend::direct::impl$7::device_create_render_pipeline
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\backend\direct.rs:1210
18: wgpu::context::impl$5::device_create_render_pipeline<wgpu::backend::direct::Context>
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\context.rs:2334
19: wgpu::Device::create_render_pipeline
at C:\Users\yanchith\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\lib.rs:2552
20: g1_renderer_wgpu::WgpuRenderer::new<winit::window::Window>
at .\g1_renderer_wgpu\src\lib.rs:487
21: g1_platform_winit::main
at .\g1_platform_winit\src\main.rs:413
22: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/d627cf07ce46d230a93732a4714d16f00df9466b\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: `target\debug\g1_platform_winit.exe` (exit code: 101)
Description
Turning on
InstanceFlags::DEBUG
with on the Vulkan backend on Windows creates an OOB access when compiling a shader. Doesn't crash on D3D12 or without the DEBUG flag.Backtrace:
Vertex shader:
Fragment shader:
Repro steps
For now, I just had time to file the bug, but if it helps, tag me here, and I can make a repro repo or investigate myself in a few days.
Expected vs observed behavior
If there's something wrong with the shader, I'd like wgpu to tell me instead of crashing.
Platform
wgpu:
0.18.0
Windows 10, NVIDIA GeForce GTX 1650 (Vulkan)
The text was updated successfully, but these errors were encountered: