Comments (7)
Apologies for getting getting back on this sooner as I previously promised. I pondered the issue a bit and believe that wgpu shouldn't crash in this case to begin with: Yes, wgpu-profiler gives up the ownership of the buffer but it's wgpu's job to ensure that all pending operations with it still finish gracefully. Just like creating a buffer, scheduling rendering with it, and then discarding the buffer before the operation is finished shouldn't fail either.
That does make sense. I've been chasing after this bug for a while and it only seems to impact wgpu-profiler so I opened the issue here but in hindsight it probably made more sense in wgpu itself.
@JCapucho Can you get the full callstack for the wgpu panic you hit?
I'll try to get it as soon as I can
from wgpu-profiler.
I can no longer reproduce it in any way, I think it may have been something with my machine.
from wgpu-profiler.
My first reaction is surprise over wgpu not keeping the buffers alive, but I need to think through the issue properly; I'll probably find some time over the weekend for that.
Thank you so much for the detailed report!
from wgpu-profiler.
Apologies for getting getting back on this sooner as I previously promised. I pondered the issue a bit and believe that wgpu shouldn't crash in this case to begin with: Yes, wgpu-profiler gives up the ownership of the buffer but it's wgpu's job to ensure that all pending operations with it still finish gracefully. Just like creating a buffer, scheduling rendering with it, and then discarding the buffer before the operation is finished shouldn't fail either.
@JCapucho Can you get the full callstack for the wgpu panic you hit?
Meanwhile also still trying to repro the issue reliably myself
from wgpu-profiler.
Tried replicate the crash by going through wgpu calls directly but can't get to it that way either :/
I thought the issue is that we're dropping the buffer before it's mapped, but it must be something more complex than this
{
let buffer = device.create_buffer(&wgpu::BufferDescriptor {
label: Some("test buffer"),
size: 1024,
usage: wgpu::BufferUsages::COPY_DST | wgpu::BufferUsages::MAP_READ,
mapped_at_creation: false,
});
let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor::default());
let query_set = device.create_query_set(&wgpu::QuerySetDescriptor {
label: None,
ty: wgpu::QueryType::Timestamp,
count: 1,
});
encoder.write_timestamp(&query_set, 0);
encoder.resolve_query_set(&query_set, 0..1, &buffer, 0);
queue.submit([encoder.finish()]);
buffer.slice(..).map_async(wgpu::MapMode::Read, |_| {});
}
device.poll(wgpu::Maintain::Poll);
High hopes on your panic backtrace
from wgpu-profiler.
@Wumpf sorry for not responding earlier but I've been trying to reproduce the issue with debug info enabled but it doesn't seem to trigger with it enabled, it's one of those.
from wgpu-profiler.
from wgpu-profiler.
Related Issues (9)
- Document required wgpu features and/or have a function that returns them.
- Integration with tracy_client HOT 4
- Slight docs inaccuracy HOT 2
- wgpu 14?
- 0.11 broken due to invalid buffer usage `wgpu::BufferUsages::QUERY_RESOLVE | wgpu::BufferUsages::MAP_READ` HOT 1
- Show current thread id and process id
- Scope guard types HOT 7
- scoped_render_pass and scoped_compute_pass don't need `#[must_use]`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wgpu-profiler.