Open GopherJ opened 3 weeks ago
wgpu seems to be behaving very differently with different runs of CI using macos-latest
@GopherJ Is this a duplicate of #6110?
yes lol, sorry
before closing, actually this on throws an error, are they the same? I'm not 100% sure yet because that one is just too slow
Your code has undefined behavior:
let result =
unsafe { core::slice::from_raw_parts(data.as_ptr() as *mut [BaseElement; 4], n) };
// With the current interface, we have to make sure all mapped views are
// dropped before we unmap the buffer.
drop(data);
staging_buffer.unmap(); // Unmaps buffer from memory
You're dropping the mapped buffer, which you haven't converted to a Vec<> yet, so data.as_ptr()
becomes invalid, leading to invalid memory being accessed. Convert result to a Vec<> before dropping/unmapping the buffer.
Description wgpu sometimes unable to do validator and hence fails to create compute pipeline
Repro steps
Expected vs observed behavior don't fail to do validation
Extra materials Screenshots to help explain your problem. Validation logs can be attached in case there are warnings and errors. Zip-compressed API traces and GPU captures can also land here.
Platform Information about your OS, version of
wgpu
, your tech stack, etc.