From 2dad6534b841c449100db3a5647fa867ce4db199 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Mon, 19 May 2025 18:08:35 -0700 Subject: [PATCH] GPU: Add missing compute-writeable texture formats --- src/gpu/SDL_gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpu/SDL_gpu.c b/src/gpu/SDL_gpu.c index 6a6b161cd0..3008cc24cb 100644 --- a/src/gpu/SDL_gpu.c +++ b/src/gpu/SDL_gpu.c @@ -195,7 +195,7 @@ static bool TextureFormatIsComputeWritable[] = { true, // R16_UNORM true, // R16G16_UNORM true, // R16G16B16A16_UNORM - false, // R10G10B10A2_UNORM + true, // R10G10B10A2_UNORM false, // B5G6R5_UNORM false, // B5G5R5A1_UNORM false, // B4G4R4A4_UNORM @@ -220,7 +220,7 @@ static bool TextureFormatIsComputeWritable[] = { true, // R32_FLOAT true, // R32G32_FLOAT true, // R32G32B32A32_FLOAT - false, // R11G11B10_UFLOAT + true, // R11G11B10_UFLOAT true, // R8_UINT true, // R8G8_UINT true, // R8G8B8A8_UINT @@ -839,7 +839,7 @@ bool SDL_GPUTextureSupportsFormat( CHECK_TEXTUREFORMAT_ENUM_INVALID(format, false) } - if ((usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) || + if ((usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE) || (usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE)) { if (!TextureFormatIsComputeWritable[format]) { return false;