Kaynağa Gözat

GPU D3D12: Fix depth format sample count support check

Evan Hemsley 2 hafta önce
ebeveyn
işleme
b54c7178b9
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      src/gpu/d3d12/SDL_gpu_d3d12.c

+ 7 - 0
src/gpu/d3d12/SDL_gpu_d3d12.c

@@ -8335,6 +8335,13 @@ static bool D3D12_SupportsSampleCount(
     featureData.Flags = (D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS)0;
     featureData.Flags = (D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS)0;
 #endif
 #endif
     featureData.Format = SDLToD3D12_TextureFormat[format];
     featureData.Format = SDLToD3D12_TextureFormat[format];
+
+    if (IsDepthFormat(format)) {
+        featureData.Format = SDLToD3D12_DepthFormat[format];
+    } else {
+        featureData.Format = SDLToD3D12_TextureFormat[format];
+    }
+
     featureData.SampleCount = SDLToD3D12_SampleCount[sampleCount];
     featureData.SampleCount = SDLToD3D12_SampleCount[sampleCount];
     res = ID3D12Device_CheckFeatureSupport(
     res = ID3D12Device_CheckFeatureSupport(
         renderer->device,
         renderer->device,