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

Copy Error: Start is offset by 256 in Vello #82

Closed
DJMcNab opened this issue Sep 12, 2024 · 1 comment · Fixed by #83
Closed

Copy Error: Start is offset by 256 in Vello #82

DJMcNab opened this issue Sep 12, 2024 · 1 comment · Fixed by #83

Comments

@DJMcNab
Copy link

DJMcNab commented Sep 12, 2024

Since 0.8.1 (i.e. with #79 fixed), I can't run wgpu-profiler on Vello, because of the:

[2024-09-12T10:10:03.568Z ERROR wgpu::backend::wgpu_core] Handling wgpu errors as fatal by default
thread 'main' panicked at /home/djmcnab/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-22.1.0/src/backend/wgpu_core.rs:3411:5:
wgpu error: Validation Error

Caused by:
  In CommandEncoder::copy_buffer_to_buffer
    Copy error
      Copy of 256..544 would end up overrunning the bounds of the Destination buffer of size 288


stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::ops::function::Fn::call
   3: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error
   4: <wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::command_encoder_copy_buffer_to_buffer
   5: <T as wgpu::context::DynContext>::command_encoder_copy_buffer_to_buffer
   6: wgpu::CommandEncoder::copy_buffer_to_buffer
   7: wgpu_profiler::profiler::GpuProfiler::resolve_queries
   8: vello::wgpu_engine::WgpuEngine::run_recording
   9: vello::Renderer::render_to_surface
  10: <with_winit::VelloApp as winit::application::ApplicationHandler<with_winit::UserEvent>>::window_event
  11: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  12: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::pump_events
  13: winit::platform_impl::platform::wayland::event_loop::EventLoop<T>::run_on_demand
  14: with_winit::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

This can be reproduced in linebender/vello#687 using:

> cargo run -p with_winit

then pressing G

Wumpf added a commit that referenced this issue Sep 21, 2024
Wumpf added a commit that referenced this issue Sep 21, 2024
…rations (#83)

* add regression test for #82

* Fix multiple resolves per frame causing invalid buffer copy operations
@Wumpf Wumpf closed this as completed in #83 Sep 21, 2024
@Wumpf
Copy link
Owner

Wumpf commented Sep 21, 2024

@DJMcNab thanks for the clean repro. Was able to get it into the regression test and fix it proper this time. Hopefully :).
Published 0.18.2 containing the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants