From 99c52173f731adb07358442e20856b54107904b2 Mon Sep 17 00:00:00 2001 From: MAG-AdrianMeredith <100127317+MAG-AdrianMeredith@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:34:15 +0000 Subject: [PATCH] fix #7098 missing texture format (#7099) --- src/platform/graphics/webgpu/constants.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/graphics/webgpu/constants.js b/src/platform/graphics/webgpu/constants.js index 11b02486eb8..9cf254dd782 100644 --- a/src/platform/graphics/webgpu/constants.js +++ b/src/platform/graphics/webgpu/constants.js @@ -12,7 +12,8 @@ import { PIXELFORMAT_DXT1_SRGB, PIXELFORMAT_DXT3_SRGBA, PIXELFORMAT_DXT5_SRGBA, PIXELFORMAT_PVRTC_2BPP_SRGB_1, PIXELFORMAT_PVRTC_2BPP_SRGBA_1, PIXELFORMAT_PVRTC_4BPP_SRGB_1, PIXELFORMAT_PVRTC_4BPP_SRGBA_1, PIXELFORMAT_ETC2_SRGB, PIXELFORMAT_ETC2_SRGBA, PIXELFORMAT_SBGRA8, - PIXELFORMAT_BC6F, PIXELFORMAT_BC6UF, PIXELFORMAT_BC7, PIXELFORMAT_BC7_SRGBA + PIXELFORMAT_BC6F, PIXELFORMAT_BC6UF, PIXELFORMAT_BC7, PIXELFORMAT_BC7_SRGBA, + PIXELFORMAT_ASTC_4x4_SRGB } from '../constants.js'; // map of PIXELFORMAT_*** to GPUTextureFormat @@ -87,3 +88,4 @@ gpuTextureFormats[PIXELFORMAT_PVRTC_4BPP_SRGBA_1] = ''; gpuTextureFormats[PIXELFORMAT_ETC2_SRGB] = 'etc2-rgb8unorm-srgb'; gpuTextureFormats[PIXELFORMAT_ETC2_SRGBA] = 'etc2-rgba8unorm-srgb'; gpuTextureFormats[PIXELFORMAT_BC7_SRGBA] = 'bc7-rgba-unorm-srgb'; +gpuTextureFormats[PIXELFORMAT_ASTC_4x4_SRGB] = 'astc-4x4-unorm-srgb';