From 4fc9f58de2c9ab2dec9e71b2d612d67c5f7291c9 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Tue, 16 Jun 2026 11:35:44 -0700 Subject: [PATCH] GPU: Allow multisample textures to be read --- src/gpu/SDL_gpu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gpu/SDL_gpu.c b/src/gpu/SDL_gpu.c index 01e1eb5e9cfa7..f186848b0c51a 100644 --- a/src/gpu/SDL_gpu.c +++ b/src/gpu/SDL_gpu.c @@ -1287,11 +1287,8 @@ SDL_GPUTexture *SDL_CreateGPUTexture( failed = true; } if (createinfo->sample_count > SDL_GPU_SAMPLECOUNT_1 && - (createinfo->usage & (SDL_GPU_TEXTUREUSAGE_SAMPLER | - SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ | - SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ | - SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE))) { - SDL_assert_release(!"For multisample textures: usage cannot contain SAMPLER or STORAGE flags"); + (createinfo->usage & SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE)) { + SDL_assert_release(!"For multisample textures: usage cannot contain COMPUTE_STORAGE_WRITE flag"); failed = true; } if (IsDepthFormat(createinfo->format) && (createinfo->usage & ~(SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET | SDL_GPU_TEXTUREUSAGE_SAMPLER))) {