-
Notifications
You must be signed in to change notification settings - Fork 935
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
Result buffer getting destroyed while required to be alive by the command buffer in long running compute shader #5000
Comments
If I debug and put a breakpoint on the |
Hey, sorry meant to reply to your discussion but got sidetracked, I think this is #3601 - 5 seconds is our internal timeout, and we don't properly handle the case where the timeout is hit. |
So we can't have compute shaders running for more than 5 seconds? I guess I need to split it up the shader invocation some how/ |
Also in case of a timeout the callback in map_async shouldn't trigger right ? As the callback is only suppose to trigger when the buffer is ready for mapping |
Correct, though this is a bug in our code, not yours.
Yeah, this is a symptom of us treating timeout as "it's finished" not "it's not done yet" |
Got it thanks |
Description
Hi, I implemented a raytracer using wgpu and compute shaders. It works fine, but when I try to render a larger scene or anything that takes more than 8 secs, I get an empty buffer as output. without any errors logged or panics.
If I run with
METAL_DEVICE_WRAPPER_TYPE=1
I get the following errorI am assuming this has something to do with how I am waiting for the shader to finish execution
I read in the examples that we should use device.poll on a separate thread, being new to rust I am not sure how to go about doing that, an example of the same would be helpful.
My main issue is no errors or panics are reported unless I set the env variable
METAL_DEVICE_WRAPPER_TYPE=1
, I tried adding a simple divide by zero error in my compute shaders and still no errors were reported.Repro steps
Source code - https://github.com/BLaZeKiLL/wgpu-app
cargo run --bin vexray
Expected vs observed behavior
result buffer shouldn't be dropped before copy is complete
Platform
OS: MacOS 14.2
Backend: Metal
Wgpu: 0.18
Rust: 1.74.1
The text was updated successfully, but these errors were encountered: