RyanSpaker / CornGame

Corn Maze game written in rust with the bevy engine
0 stars 0 forks source link

CRASH: Corn Vote_Scan Pipeline dispatch group size sometimes too big. #4

Open blueforesticarus opened 7 months ago

blueforesticarus commented 7 months ago

Happens occasionally, immediately on start after scene displayed.

2024-02-20T08:35:07.848604Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-02-20T08:35:07.848835Z  INFO log: Guessed window scale factor: 1.4166666666666667
2024-02-20T08:35:07.880472Z  INFO bevy_render::renderer: AdapterInfo { name: "AMD Radeon RX Vega (RADV VEGA10)", vendor: 4098, device: 26751, device_type: DiscreteGpu, driver: "radv", driver_info: "Mesa 23.3.5", backend: Vulkan }
2024-02-20T08:35:07.958481Z  INFO corn_game::app: Loading Start
2024-02-20T08:35:07.971766Z  INFO corn_game::app: Loading Finished, Elapsed Millis: 13
Max Lod: 50
2024-02-20T08:35:08.135052Z ERROR log: Handling wgpu errors as fatal by default
thread '<unnamed>' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5:
wgpu error: Validation Error

Caused by:
    In a ComputePass
      note: encoder = `<CommandBuffer-(6, 3, Vulkan)>`
    In a dispatch command, indirect:false
      note: compute pipeline = `Corn Vote_Scan Pipeline`
    Each current dispatch group size dimension ([86294, 1, 1]) must be less or equal to 65535

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in exclusive system `bevy_render::renderer::render_system`!
thread 'Compute Task Pool (13)' panicked at /home/user/net/git/bevy/crates/bevy_render/src/pipelined_rendering.rs:49:67:
called `Result::unwrap()` on an `Err` value: RecvError
RyanSpaker commented 7 months ago

Ya that makes sense, didn't even realize there was a limit. Ill just have it split into multiple calls if the dispatch count excees 65535.

RyanSpaker commented 7 months ago

Fixed the issue for now, but there is still a problem with certain buffer operations such as defragging. It's not causing problems right now but it'll need to be fixed as well.

blueforesticarus commented 7 months ago
2024-02-23T04:31:35.301188Z  INFO bevy_winit::system: Creating new window "App" (0v1)
2024-02-23T04:31:35.301420Z  INFO log: Guessed window scale factor: 1.4166666666666667
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
2024-02-23T04:31:35.360662Z  INFO bevy_render::renderer: AdapterInfo { name: "llvmpipe (LLVM 16.0.6, 256 bits)", vendor: 65541, device: 0, device_type: Cpu, driver: "llvmpipe", driver_info: "Mesa 23.3.5 (LLVM 16.0.6)", backend: Vulkan }
2024-02-23T04:31:35.453703Z  INFO corn_game::app: Loading Start
2024-02-23T04:31:35.466111Z  INFO corn_game::app: Loading Finished, Elapsed Millis: 12
Max Lod: 50
2024-02-23T04:31:35.856976Z ERROR log: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (10)' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5:
wgpu error: Validation Error

Caused by:
    In Device::create_bind_group
      note: label = `Image Carved Corn Init Bind Group`
    Buffer binding 0 range 193805440 exceeds `max_*_buffer_binding_size` limit 134217728

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Encountered a panic in system `corn_game::ecs::corn::data_pipeline::operation_executor::CornOperationResources::prepare_init_bindgroup<corn_game::ecs::corn::field::cf_image_carved::ImageCarvedHexagonalCornField>`!
thread 'Compute Task Pool (12)' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_render-0.13.0/src/pipelined_rendering.rs:49:67:
called `Result::unwrap()` on an `Err` value: RecvError

Edit: pretty sure this was fixed in corn_rendering