summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-12-15 23:35:55 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-12-15 23:35:55 +0000
commitc38d9b8adc4007dfc05bd48ab643896d7fff9560 (patch)
tree4c173efee6a0758b0ed07aef9810fb41e4dbcb20 /Graphics/GraphicsEngineD3DBase
parentMinor fix after merge (diff)
downloadDiligentCore-c38d9b8adc4007dfc05bd48ab643896d7fff9560.tar.gz
DiligentCore-c38d9b8adc4007dfc05bd48ab643896d7fff9560.zip
Fixed Win SDK 17763 build issues
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/D3DShaderResourceLoader.hpp18
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/ShaderResources.hpp6
2 files changed, 22 insertions, 2 deletions
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 <d3dcommon.h>
+#ifndef NTDDI_WIN10_19H1 // Defined in Win SDK 19041
+# define D3D_SIT_RTACCELERATIONSTRUCTURE (D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER + 1)
+#endif
+
+#include <ntverp.h>
+
#include "ShaderD3D.h"
#include "STDAllocator.hpp"
#include "HashUtils.hpp"