From 54fd07084879339bdf8b5a53cd835445ab99e8d1 Mon Sep 17 00:00:00 2001 From: "J.C" <1571995@qq.com> Date: Fri, 4 Sep 2026 15:06:32 +0800 Subject: [PATCH] wrong const value passed for webgl2 to op with image 3d (#297) --- cocos/gfx/webgl2/webgl2-commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/gfx/webgl2/webgl2-commands.ts b/cocos/gfx/webgl2/webgl2-commands.ts index 4464c8fb2f..65ef8186c7 100644 --- a/cocos/gfx/webgl2/webgl2-commands.ts +++ b/cocos/gfx/webgl2/webgl2-commands.ts @@ -2986,7 +2986,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( if (!isCompressed) { gl.texSubImage3D( - WebGLConstants.TEXTURE_2D_ARRAY, + WebGLConstants.TEXTURE_3D, mipLevel, offset.x, offset.y, @@ -3000,7 +3000,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( ); } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) { gl.compressedTexSubImage3D( - WebGLConstants.TEXTURE_2D_ARRAY, + WebGLConstants.TEXTURE_3D, mipLevel, offset.x, offset.y, @@ -3013,7 +3013,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( ); } else { // WEBGL_compressed_texture_etc1 gl.compressedTexImage3D( - WebGLConstants.TEXTURE_2D_ARRAY, + WebGLConstants.TEXTURE_3D, mipLevel, gpuTexture.glInternalFmt, destWidth,