From 61675b5c621563619c19ca99dbf42d7fcf5d2165 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Sun, 8 Oct 2023 16:48:08 +0200 Subject: [PATCH] sokol_gfx.h wgpu: fix ETC2 texture compression support --- sokol_gfx.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sokol_gfx.h b/sokol_gfx.h index 75148c9fe..e2866b671 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -12606,6 +12606,11 @@ _SOKOL_PRIVATE WGPUTextureFormat _sg_wgpu_textureformat(sg_pixel_format p) { case SG_PIXELFORMAT_BC6H_RGBF: return WGPUTextureFormat_BC6HRGBFloat; case SG_PIXELFORMAT_BC6H_RGBUF: return WGPUTextureFormat_BC6HRGBUfloat; case SG_PIXELFORMAT_BC7_RGBA: return WGPUTextureFormat_BC7RGBAUnorm; + case SG_PIXELFORMAT_ETC2_RGB8: return WGPUTextureFormat_ETC2RGB8Unorm; + case SG_PIXELFORMAT_ETC2_RGB8A1: return WGPUTextureFormat_ETC2RGB8A1Unorm; + case SG_PIXELFORMAT_ETC2_RGBA8: return WGPUTextureFormat_ETC2RGBA8Unorm; + case SG_PIXELFORMAT_ETC2_RG11: return WGPUTextureFormat_EACR11Unorm; + case SG_PIXELFORMAT_ETC2_RG11SN: return WGPUTextureFormat_EACR11Snorm; // NOT SUPPORTED case SG_PIXELFORMAT_R16: @@ -12620,11 +12625,6 @@ _SOKOL_PRIVATE WGPUTextureFormat _sg_wgpu_textureformat(sg_pixel_format p) { case SG_PIXELFORMAT_PVRTC_RGB_4BPP: case SG_PIXELFORMAT_PVRTC_RGBA_2BPP: case SG_PIXELFORMAT_PVRTC_RGBA_4BPP: - case SG_PIXELFORMAT_ETC2_RGB8: - case SG_PIXELFORMAT_ETC2_RGB8A1: - case SG_PIXELFORMAT_ETC2_RGBA8: - case SG_PIXELFORMAT_ETC2_RG11: - case SG_PIXELFORMAT_ETC2_RG11SN: default: SOKOL_UNREACHABLE; return WGPUTextureFormat_Force32;