You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Rust wgpu API will usually simply panic! on things like invalid shader code, buffers that are too big, using shader features you didn't acquire when initializing wgpu, etc, instead of having all of these fallible APIs return a Result you need to check or unwrap.
I was honestly really surprised by this decision, and I definitely don't want this to be the experience in Alan. I feel like I'm going to end up playing whack-a-mole with issues on this, but at least for the wgpu::Buffer type, I think I can write some logic to wrap some safety onto it pretty cheaply, and make my createBuffer function return a Result<Buffer> instead of just a Buffer.
The text was updated successfully, but these errors were encountered:
The Rust
wgpu
API will usually simplypanic!
on things like invalid shader code, buffers that are too big, using shader features you didn't acquire when initializingwgpu
, etc, instead of having all of these fallible APIs return a Result you need to check orunwrap
.I was honestly really surprised by this decision, and I definitely don't want this to be the experience in Alan. I feel like I'm going to end up playing whack-a-mole with issues on this, but at least for the
wgpu::Buffer
type, I think I can write some logic to wrap some safety onto it pretty cheaply, and make mycreateBuffer
function return aResult<Buffer>
instead of just aBuffer
.The text was updated successfully, but these errors were encountered: