Skip to content

Commit

Permalink
sokol_gfx.h wgpu: support SRGB8A8 and RGB9E5 pixel formats
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 16, 2023
1 parent f2ca0cf commit 1378711
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -12603,7 +12603,8 @@ _SOKOL_PRIVATE WGPUTextureFormat _sg_wgpu_textureformat(sg_pixel_format p) {
case SG_PIXELFORMAT_RG16UI: return WGPUTextureFormat_RG16Uint;
case SG_PIXELFORMAT_RG16SI: return WGPUTextureFormat_RG16Sint;
case SG_PIXELFORMAT_RG16F: return WGPUTextureFormat_RG16Float;
case SG_PIXELFORMAT_RGBA8: return WGPUTextureFormat_RGBA8Unorm;
case SG_PIXELFORMAT_RGBA8: return WGPUTextureFormat_RGBA8UnormSrgb;
case SG_PIXELFORMAT_SRGB8A8: return WGPUTextureFormat_RGBA8Unorm;
case SG_PIXELFORMAT_RGBA8SN: return WGPUTextureFormat_RGBA8Snorm;
case SG_PIXELFORMAT_RGBA8UI: return WGPUTextureFormat_RGBA8Uint;
case SG_PIXELFORMAT_RGBA8SI: return WGPUTextureFormat_RGBA8Sint;
Expand Down Expand Up @@ -12636,6 +12637,7 @@ _SOKOL_PRIVATE WGPUTextureFormat _sg_wgpu_textureformat(sg_pixel_format p) {
case SG_PIXELFORMAT_ETC2_RGBA8: return WGPUTextureFormat_ETC2RGBA8Unorm;
case SG_PIXELFORMAT_ETC2_RG11: return WGPUTextureFormat_EACR11Unorm;
case SG_PIXELFORMAT_ETC2_RG11SN: return WGPUTextureFormat_EACR11Snorm;
case SG_PIXELFORMAT_RGB9E5: return WGPUTextureFormat_RGB9E5Ufloat;

// NOT SUPPORTED
case SG_PIXELFORMAT_R16:
Expand All @@ -12644,8 +12646,6 @@ _SOKOL_PRIVATE WGPUTextureFormat _sg_wgpu_textureformat(sg_pixel_format p) {
case SG_PIXELFORMAT_RG16SN:
case SG_PIXELFORMAT_RGBA16:
case SG_PIXELFORMAT_RGBA16SN:
case SG_PIXELFORMAT_SRGB8A8:
case SG_PIXELFORMAT_RGB9E5:
case SG_PIXELFORMAT_PVRTC_RGB_2BPP:
case SG_PIXELFORMAT_PVRTC_RGB_4BPP:
case SG_PIXELFORMAT_PVRTC_RGBA_2BPP:
Expand Down

0 comments on commit 1378711

Please sign in to comment.