From 59be7e52bfbde70cce0267d47d8069d2312fc578 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 18 Mar 2021 20:23:25 -0700 Subject: Fixed Win SDK 17763 build issues --- Graphics/GraphicsEngineD3D12/include/pch.h | 6 ++++++ Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 3 +++ Graphics/ShaderTools/src/DXCompiler.cpp | 11 +++++++++++ 3 files changed, 20 insertions(+) (limited to 'Graphics') diff --git a/Graphics/GraphicsEngineD3D12/include/pch.h b/Graphics/GraphicsEngineD3D12/include/pch.h index 5bcc4f04..b719aceb 100644 --- a/Graphics/GraphicsEngineD3D12/include/pch.h +++ b/Graphics/GraphicsEngineD3D12/include/pch.h @@ -41,6 +41,12 @@ #include #include +#ifndef NTDDI_WIN10_VB // First defined in Win SDK 10.0.19041.0 +# define D3D12_INDIRECT_ARGUMENT_TYPE_DISPATCH_RAYS static_cast(D3D12_INDIRECT_ARGUMENT_TYPE_UNORDERED_ACCESS_VIEW + 1) +# define D3D12_RAYTRACING_TIER_1_1 static_cast(11) +#endif + + #include "PlatformDefinitions.h" #include "Errors.hpp" #include "RefCntAutoPtr.hpp" diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp index 8934c4aa..a6cc4ba3 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp @@ -1188,6 +1188,9 @@ void PipelineStateVkImpl::DvpValidateResourceLimits() const NonUniformIndexingSupported = true; NonUniformIndexingIsNative = true; break; + + default: + UNEXPECTED("Unexpected descriptor type"); } // TODO: We don't know if this resource is used for non-uniform indexing or not. diff --git a/Graphics/ShaderTools/src/DXCompiler.cpp b/Graphics/ShaderTools/src/DXCompiler.cpp index 488a1e00..33d96673 100644 --- a/Graphics/ShaderTools/src/DXCompiler.cpp +++ b/Graphics/ShaderTools/src/DXCompiler.cpp @@ -46,6 +46,13 @@ #if D3D12_SUPPORTED # include + +# ifndef NTDDI_WIN10_VB // First defined in Win SDK 10.0.19041.0 +# define NO_D3D_SIT_ACCELSTRUCT_FEEDBACK_TEX 1 + +# define D3D_SIT_RTACCELERATIONSTRUCTURE static_cast(D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + 1) +# define D3D_SIT_UAV_FEEDBACKTEXTURE static_cast(D3D_SIT_RTACCELERATIONSTRUCTURE + 1) +# endif #endif #include "HLSLUtils.hpp" @@ -882,7 +889,11 @@ bool DXCompilerImpl::RemapResourceBindings(const TResourceBindingMap& ResourceMa Ext.SrcBindPoint = ResDesc.BindPoint; Ext.SrcSpace = ResDesc.Space; +# ifdef NO_D3D_SIT_ACCELSTRUCT_FEEDBACK_TEX + switch (int{ResDesc.Type}) // Prevent "not a valid value for switch of enum '_D3D_SHADER_INPUT_TYPE'" warning +# else switch (ResDesc.Type) +# endif { case D3D_SIT_CBUFFER: Ext.Type = RES_TYPE_CBV; -- cgit v1.2.3