summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index 338f0f50..8cbe331f 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -44,6 +44,18 @@
namespace Diligent
{
+
+#if !DILIGENT_NO_HLSL
+namespace GLSLangUtils
+{
+void SpvOptimizerMessageConsumer(
+ spv_message_level_t level,
+ const char* /* source */,
+ const spv_position_t& /* position */,
+ const char* message);
+}
+#endif
+
namespace
{
@@ -62,6 +74,7 @@ bool StripReflection(const VulkanUtilities::VulkanLogicalDevice& LogicalDevice,
Target = SPV_ENV_VULKAN_1_1_SPIRV_1_4;
spvtools::Optimizer SpirvOptimizer(Target);
+ SpirvOptimizer.SetMessageConsumer(GLSLangUtils::SpvOptimizerMessageConsumer);
// Decorations defined in SPV_GOOGLE_hlsl_functionality1 are the only instructions
// removed by strip-reflect-info pass. SPIRV offsets become INVALID after this operation.
SpirvOptimizer.RegisterPass(spvtools::CreateStripReflectInfoPass());