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/ShaderTools/src/DXCompiler.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Graphics/ShaderTools') 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