From c38d9b8adc4007dfc05bd48ab643896d7fff9560 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 15 Dec 2020 15:35:55 -0800 Subject: Fixed Win SDK 17763 build issues --- .../include/D3DShaderResourceLoader.hpp | 18 ++++++++++++++++-- .../GraphicsEngineD3DBase/include/ShaderResources.hpp | 6 ++++++ 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp index 5d5f847e..a4b41e17 100644 --- a/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp +++ b/Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp @@ -179,8 +179,16 @@ void LoadD3DShaderResources(TShaderReflection* pShaderReflection, case D3D_SIT_UAV_APPEND_STRUCTURED: UNSUPPORTED( "Append structured buffers are not supported" ); break; case D3D_SIT_UAV_CONSUME_STRUCTURED: UNSUPPORTED( "Consume structured buffers are not supported" ); break; case D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER: UNSUPPORTED( "RW structured buffers with counter are not supported" ); break; - case D3D_SIT_RTACCELERATIONSTRUCTURE: ++RC.NumAccelStructs; break; - // clang-format on + // clang-format on + +#pragma warning(push) +#pragma warning(disable : 4063) + // D3D_SIT_RTACCELERATIONSTRUCTURE enum value is missing in Win SDK 17763, so we emulate it as #define, which + // makes the compiler emit the following warning: + // warning C4063: case '12' is not a valid value for switch of enum '_D3D_SHADER_INPUT_TYPE' + case D3D_SIT_RTACCELERATIONSTRUCTURE: ++RC.NumAccelStructs; break; +#pragma warning(pop) + default: UNEXPECTED("Unexpected resource type"); } ResourceNamesPoolSize += Name.length() + 1; @@ -291,7 +299,13 @@ void LoadD3DShaderResources(TShaderReflection* pShaderReflection, break; } +#pragma warning(push) +#pragma warning(disable : 4063) + // D3D_SIT_RTACCELERATIONSTRUCTURE enum value is missing in Win SDK 17763, so we emulate it as #define, which + // makes the compiler emit the following warning: + // warning C4063: case '12' is not a valid value for switch of enum '_D3D_SHADER_INPUT_TYPE' case D3D_SIT_RTACCELERATIONSTRUCTURE: +#pragma warning(pop) { OnNewAccelStruct(Res); break; diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp index c5607ce3..3366831e 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp @@ -61,6 +61,12 @@ #define NOMINMAX #include +#ifndef NTDDI_WIN10_19H1 // Defined in Win SDK 19041 +# define D3D_SIT_RTACCELERATIONSTRUCTURE (D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + 1) +#endif + +#include + #include "ShaderD3D.h" #include "STDAllocator.hpp" #include "HashUtils.hpp" -- cgit v1.2.3