File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 4343#include " EngineMemory.h"
4444#include " StringTools.hpp"
4545
46- // We always need this to patch uniform buffer block, no matter DILIGENT_NO_HLSL defined or not.
47- #include " SPIRVTools.hpp"
46+ #if !DILIGENT_NO_HLSL
47+ # include " SPIRVTools.hpp"
48+ #endif
4849
4950namespace Diligent
5051{
@@ -966,6 +967,7 @@ void PipelineStateVkImpl::InitPipelineLayout(const PipelineStateCreateInfo& Crea
966967void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant (const PushConstantInfoVk& PushConstantInfo,
967968 TShaderStages& ShaderStages) const noexcept (false )
968969{
970+ #if !DILIGENT_NO_HLSL
969971 // If no push constant was selected, no patching needed
970972 if (PushConstantInfo.SignatureIndex == INVALID_PUSH_CONSTANT_INDEX ||
971973 PushConstantInfo.ResourceIndex == INVALID_PUSH_CONSTANT_INDEX)
@@ -1046,6 +1048,9 @@ void PipelineStateVkImpl::PatchShaderConvertUniformBufferToPushConstant(const Pu
10461048 }
10471049 }
10481050 }
1051+ #else
1052+ // Warning: SPIRV-Tools is not available due to DILIGENT_NO_HLSL defined.
1053+ #endif
10491054}
10501055
10511056template <typename PSOCreateInfoType>
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ endif()
9595
9696set (ENABLE_SPIRV FALSE )
9797set (USE_GLSLANG FALSE )
98- set (USE_SPIRV_TOOLS TRUE ) # -- we always need SPIRV-Tools for SPIRV bytecode patching on vulkan backend.
98+ set (USE_SPIRV_TOOLS FALSE )
9999if (DILIGENT_USE_SPIRV_TOOLCHAIN)
100100 set (ENABLE_SPIRV TRUE )
101101 # NB: do not use if(TARGET glsang) check here as glsang may be present
You can’t perform that action at this time.
0 commit comments