Skip to content

Commit 3520519

Browse files
committed
restore CMakeLists.txt
1 parent 1164bde commit 3520519

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@
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

4950
namespace Diligent
5051
{
@@ -966,6 +967,7 @@ void PipelineStateVkImpl::InitPipelineLayout(const PipelineStateCreateInfo& Crea
966967
void 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

10511056
template <typename PSOCreateInfoType>

Graphics/ShaderTools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ endif()
9595

9696
set(ENABLE_SPIRV FALSE)
9797
set(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)
9999
if(DILIGENT_USE_SPIRV_TOOLCHAIN)
100100
set(ENABLE_SPIRV TRUE)
101101
# NB: do not use if(TARGET glsang) check here as glsang may be present

0 commit comments

Comments
 (0)