Module: Mesa
Branch: main
Commit: 27c304be2ed743b0e03e386829e28c4dea831640
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=27c304be2ed743b0e03e386829e28c4dea831640

Author: Jesse Natalie <[email protected]>
Date:   Fri Apr 14 09:21:04 2023 -0700

d3d12: Remove #if D3D12_SDK_VERSION blocks now that 610 is required

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22504>

---

 src/gallium/drivers/d3d12/d3d12_common.h           |  2 +-
 src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp | 12 ++++--------
 src/gallium/drivers/d3d12/d3d12_screen.cpp         |  2 --
 src/gallium/drivers/d3d12/d3d12_screen.h           |  2 --
 src/gallium/drivers/d3d12/d3d12_video_types.h      |  2 +-
 5 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/d3d12/d3d12_common.h 
b/src/gallium/drivers/d3d12/d3d12_common.h
index 42857dda755..9defde858e3 100644
--- a/src/gallium/drivers/d3d12/d3d12_common.h
+++ b/src/gallium/drivers/d3d12/d3d12_common.h
@@ -56,7 +56,7 @@
 #endif /* D3D12_TEXTURE_DATA_PITCH_ALIGNMENT */
 
 #if defined(__cplusplus)
-#if !defined(_WIN32) || defined(_MSC_VER) || D3D12_SDK_VERSION < 606
+#if !defined(_WIN32) || defined(_MSC_VER)
 inline D3D12_CPU_DESCRIPTOR_HANDLE
 GetCPUDescriptorHandleForHeapStart(ID3D12DescriptorHeap *heap)
 {
diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp 
b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
index 030ed4772e1..501ee851a22 100644
--- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
@@ -316,14 +316,10 @@ create_gfx_pipeline_state(struct d3d12_context *ctx)
          rast.ForcedSampleCount = 1;
          pso_desc.DSVFormat = DXGI_FORMAT_UNKNOWN;
       }
-   } else if (state->samples > 1) {
-#if D3D12_SDK_VERSION >= 609
-      if (!(screen->opts19.SupportedSampleCountsWithNoOutputs & (1 << 
state->samples)))
-#endif
-      {
-         samples.Count = 1;
-         rast.ForcedSampleCount = state->samples;
-      }
+   } else if (state->samples > 1 &&
+              !(screen->opts19.SupportedSampleCountsWithNoOutputs & (1 << 
state->samples))) {
+      samples.Count = 1;
+      rast.ForcedSampleCount = state->samples;
    }
    samples.Quality = 0;
 
diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp 
b/src/gallium/drivers/d3d12/d3d12_screen.cpp
index cfd7daf2c88..638c2a155b2 100644
--- a/src/gallium/drivers/d3d12/d3d12_screen.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp
@@ -1480,9 +1480,7 @@ d3d12_init_screen(struct d3d12_screen *screen, IUnknown 
*adapter)
       debug_printf("D3D12: failed to get device options\n");
       return false;
    }
-#if D3D12_SDK_VERSION >= 609
    screen->dev->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS19, 
&screen->opts19, sizeof(screen->opts19));
-#endif
 
    screen->architecture.NodeIndex = 0;
    if (FAILED(screen->dev->CheckFeatureSupport(D3D12_FEATURE_ARCHITECTURE,
diff --git a/src/gallium/drivers/d3d12/d3d12_screen.h 
b/src/gallium/drivers/d3d12/d3d12_screen.h
index 140b5fade06..272ee0d3724 100644
--- a/src/gallium/drivers/d3d12/d3d12_screen.h
+++ b/src/gallium/drivers/d3d12/d3d12_screen.h
@@ -116,9 +116,7 @@ struct d3d12_screen {
    D3D12_FEATURE_DATA_D3D12_OPTIONS3 opts3;
    D3D12_FEATURE_DATA_D3D12_OPTIONS4 opts4;
    D3D12_FEATURE_DATA_D3D12_OPTIONS14 opts14;
-#if D3D12_SDK_VERSION >= 610
    D3D12_FEATURE_DATA_D3D12_OPTIONS19 opts19;
-#endif
 
    nir_shader_compiler_options nir_options;
 
diff --git a/src/gallium/drivers/d3d12/d3d12_video_types.h 
b/src/gallium/drivers/d3d12/d3d12_video_types.h
index 38f4c11cd1e..a40211ead75 100644
--- a/src/gallium/drivers/d3d12/d3d12_video_types.h
+++ b/src/gallium/drivers/d3d12/d3d12_video_types.h
@@ -40,7 +40,7 @@
 #include <wrl/client.h>
 using Microsoft::WRL::ComPtr;
 
-#if !defined(_WIN32) || defined(_MSC_VER) || D3D12_SDK_VERSION < 606
+#if !defined(_WIN32) || defined(_MSC_VER)
 inline D3D12_VIDEO_DECODER_HEAP_DESC
 GetDesc(ID3D12VideoDecoderHeap *heap)
 {

Reply via email to