BVE-Reborn / rend3

MAINTENCE MODE ---- Easy to use, customizable, efficient 3D renderer library built on wgpu.
https://rend3.rs
Apache License 2.0
1.05k stars 59 forks source link

Buffer binding 4 range 2147483656 exceeds `max_*_buffer_binding_size` limit 2147483648 #562

Closed John-Nagle closed 2 months ago

John-Nagle commented 6 months ago
08:21:51 [ERROR] =========> Panic wgpu error: Validation Error

Caused by:
    In Device::create_bind_group
      note: label = `GpuCuller rend3_routine::pbr::material::PbrMaterial BG`
    Buffer binding 4 range 2147483656 exceeds `max_*_buffer_binding_size` limit 2147483648

 at file /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs, line 3111 in thread main.
Backtrace:
 libcommon::common::commonutils::catch_panic::{{closure}}
             at /home/john/projects/sl/SL-test-viewer/libcommon/src/common/commonutils.rs:215:25
 wgpu::backend::direct::default_error_handler
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:3111:5
 wgpu::backend::direct::ErrorSinkRaw::handle_error
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:3097:17
 wgpu::backend::direct::Context::handle_error
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:333:9
 <wgpu::backend::direct::Context as wgpu::context::Context>::device_create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/backend/direct.rs:1107:13
 <T as wgpu::context::DynContext>::device_create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/context.rs:2308:13
 wgpu::Device::create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.18.0/src/lib.rs:2507:26
 rend3_routine::culling::culler::GpuCuller::cull
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/a68c76a/rend3-routine/src/culling/culler.rs:614:26
 rend3_routine::culling::culler::GpuCuller::add_culling_to_graph::{{closure}}
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/a68c76a/rend3-routine/src/culling/culler.rs:765:30
 rend3::graph::graph::RenderGraph::execute
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/a68c76a/rend3/src/graph/graph.rs:503:17

Panicked instead of getting the error return. Note that this is from the culler, not a request to add a mesh.

Despite the crashes, the arcanized version is otherwise running well. Graphics look the same as before. Mesh creation and texture loading are faster.

John-Nagle commented 4 months ago

It's back, post-arcanization.

If I got an error return for this it would be handled.

Panic wgpu error: Validation Error

Caused by:
    In Device::create_bind_group
      note: label = `GpuCuller rend3_routine::pbr::material::PbrMaterial BG`
    Buffer binding 4 range 2147483656 exceeds `max_*_buffer_binding_size` limit 2147483648

 at file /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs, line 3009 in thread main.
Backtrace:
 libcommon::common::commonutils::catch_panic::{{closure}}
             at /home/john/projects/sl/SL-test-viewer/libcommon/src/common/commonutils.rs:215:25
 wgpu::backend::wgpu_core::default_error_handler
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:3009:5
 wgpu::backend::wgpu_core::ErrorSinkRaw::handle_error
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:2995:17
 wgpu::backend::wgpu_core::ContextWgpuCore::handle_error
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:262:9
 <wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::device_create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/backend/wgpu_core.rs:1043:13
 <T as wgpu::context::DynContext>::device_create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/context.rs:2236:13
 wgpu::Device::create_bind_group
             at /home/john/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.19.1/src/lib.rs:2430:26
 rend3_routine::culling::culler::GpuCuller::cull
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/c7c2d85/rend3-routine/src/culling/culler.rs:614:26
 rend3_routine::culling::culler::GpuCuller::add_culling_to_graph::{{closure}}
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/c7c2d85/rend3-routine/src/culling/culler.rs:765:30
 rend3::graph::graph::RenderGraph::execute
             at /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/c7c2d85/rend3/src/graph/graph.rs:503:17
cwfitzgerald commented 2 months ago

Closed by #593