From 489f8fc0a86cd3acab806ec9bc6d72016202f769 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Tue, 1 Sep 2026 15:47:10 -0700 Subject: [PATCH] GPU D3D12: Fix depth format sample count support check --- src/gpu/d3d12/SDL_gpu_d3d12.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c index 9a263bbe0d..43015c820d 100644 --- a/src/gpu/d3d12/SDL_gpu_d3d12.c +++ b/src/gpu/d3d12/SDL_gpu_d3d12.c @@ -8372,6 +8372,13 @@ static bool D3D12_SupportsSampleCount( featureData.Flags = (D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS)0; #endif featureData.Format = SDLToD3D12_TextureFormat[format]; + + if (IsDepthFormat(format)) { + featureData.Format = SDLToD3D12_DepthFormat[format]; + } else { + featureData.Format = SDLToD3D12_TextureFormat[format]; + } + featureData.SampleCount = SDLToD3D12_SampleCount[sampleCount]; res = ID3D12Device_CheckFeatureSupport( renderer->device,