From e6a2a86f2c605a6777cbc0631ec906d912e6352d Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Fri, 6 Sep 2024 11:39:09 +0200 Subject: [PATCH] Fix a regression from #6223 (#6227) buffer and texture got swapped in one of theses few places where the type system couldn't catch my mistake. --- wgpu-hal/src/dynamic/device.rs | 2 +- wgpu-hal/src/gles/device.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/dynamic/device.rs b/wgpu-hal/src/dynamic/device.rs index ba7ec47b6..f044a001d 100644 --- a/wgpu-hal/src/dynamic/device.rs +++ b/wgpu-hal/src/dynamic/device.rs @@ -226,7 +226,7 @@ impl DynDevice for D { unsafe fn add_raw_texture(&self, texture: &dyn DynTexture) { let texture = texture.expect_downcast_ref(); - unsafe { D::add_raw_buffer(self, texture) }; + unsafe { D::add_raw_texture(self, texture) }; } unsafe fn create_texture_view( diff --git a/wgpu-hal/src/gles/device.rs b/wgpu-hal/src/gles/device.rs index 1abe2b810..15292d95c 100644 --- a/wgpu-hal/src/gles/device.rs +++ b/wgpu-hal/src/gles/device.rs @@ -986,7 +986,7 @@ impl crate::Device for super::Device { self.counters.textures.sub(1); } - unsafe fn add_raw_texture(&self, _buffer: &super::Texture) { + unsafe fn add_raw_texture(&self, _texture: &super::Texture) { self.counters.textures.add(1); }