Skip to content

Commit

Permalink
sokol_gfx.h wgpu: fix ETC2 texture compression support
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 8, 2023
1 parent dff7059 commit 61675b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand Down

0 comments on commit 61675b5

Please sign in to comment.