mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 17:31:05 +01:00
Check thata bindgroup's textures are not destroyed before using it
This commit is contained in:
1 parent
defd43dff2
commit
95c451a3b8
1 file changed
+5
-2
@@ -847,11 +847,14 @@ impl<A: HalApi> Drop for BindGroup<A> {
|
||||
|
||||
impl<A: HalApi> BindGroup<A> {
|
||||
pub(crate) fn raw(&self, guard: &SnatchGuard) -> Option<&A::BindGroup> {
|
||||
// Clippy insist on writing it this way. The idea is to return None
|
||||
// if any of the raw buffer is not valid anymore.
|
||||
for buffer in &self.used_buffer_ranges {
|
||||
// Clippy insist on writing it this way. The idea is to return None
|
||||
// if any of the raw buffer is not valid anymore.
|
||||
let _ = buffer.buffer.raw(guard)?;
|
||||
}
|
||||
for texture in &self.used_texture_ranges {
|
||||
let _ = texture.texture.raw(guard)?;
|
||||
}
|
||||
self.raw.as_ref()
|
||||
}
|
||||
pub(crate) fn validate_dynamic_bindings(
|
||||
|
||||
Reference in new issue
Block a user