From 37bc6cdccf726422e229e886ec79c4d378cb4287 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 27 Nov 2024 11:57:05 -0800 Subject: [PATCH] Minor update to silencing warnings for D3D_FEATURE_LEVEL_12_2 on older SDKs --- Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp | 3 ++- Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp index 85bdfed6f..08b6d76d6 100644 --- a/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderD3D11Impl.cpp @@ -55,6 +55,7 @@ static const ShaderVersion HLSLValidateShaderVersion(const ShaderVersion& Versio static const ShaderVersion GetD3D11ShaderModel(D3D_FEATURE_LEVEL d3dDeviceFeatureLevel, const ShaderVersion& HLSLVersion) { #if defined(_MSC_VER) && !defined(NTDDI_WIN10_FE) +# pragma warning(push) # pragma warning(disable : 4063) #endif switch (d3dDeviceFeatureLevel) @@ -88,7 +89,7 @@ static const ShaderVersion GetD3D11ShaderModel(D3D_FEATURE_LEVEL d3dDeviceFeatur return ShaderVersion{4, 0}; } #if defined(_MSC_VER) && !defined(NTDDI_WIN10_FE) -# pragma warning(default : 4063) +# pragma warning(pop) #endif } diff --git a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp index 542287ac1..2ccf7ae0c 100644 --- a/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/RenderDeviceD3D12Impl.cpp @@ -177,6 +177,7 @@ RenderDeviceD3D12Impl::RenderDeviceD3D12Impl(IReferenceCounters* pRefCo auto FeatureLevel = GetD3DFeatureLevelFromDevice(m_pd3d12Device); #if defined(_MSC_VER) && !defined(NTDDI_WIN10_FE) +# pragma warning(push) # pragma warning(disable : 4063) #endif switch (FeatureLevel) @@ -191,7 +192,7 @@ RenderDeviceD3D12Impl::RenderDeviceD3D12Impl(IReferenceCounters* pRefCo default: UNEXPECTED("Unexpected D3D feature level"); } #if defined(_MSC_VER) && !defined(NTDDI_WIN10_FE) -# pragma warning(default : 4063) +# pragma warning(pop) #endif // Detect maximum shader model.