Skip to content

Commit bcbf031

Browse files
authored
Call Texture.onUpdate() after mipmap generation instead of before, in WebGPU (#31752)
1 parent d47d1d8 commit bcbf031

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/renderers/common/Textures.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,8 @@ class Textures extends DataMap {
308308

309309
if ( options.needsMipmaps && texture.mipmaps.length === 0 ) backend.generateMipmaps( texture );
310310

311+
if ( texture.onUpdate ) texture.onUpdate( texture );
312+
311313
}
312314

313315
} else {

src/renderers/webgpu/utils/WebGPUTextureUtils.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,6 @@ class WebGPUTextureUtils {
512512

513513
textureData.version = texture.version;
514514

515-
if ( texture.onUpdate ) texture.onUpdate( texture );
516-
517515
}
518516

519517
/**

0 commit comments

Comments
 (0)