From 043fcda299d8bd329bcf6f94b9af6af62ddd4b00 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 4 Apr 2019 15:30:04 +0100 Subject: [PATCH] Fix check for external glslc --- util/test/demos/test_common.cpp | 2 +- util/test/demos/vk/vk_test.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/util/test/demos/test_common.cpp b/util/test/demos/test_common.cpp index 81b6b39e5..04f55acb7 100644 --- a/util/test/demos/test_common.cpp +++ b/util/test/demos/test_common.cpp @@ -206,7 +206,7 @@ bool SpvCompilationSupported() if(!pipe) return false; - msleep(20); + msleep(250); int code = pclose(pipe); diff --git a/util/test/demos/vk/vk_test.cpp b/util/test/demos/vk/vk_test.cpp index ae899a462..0b23bf300 100644 --- a/util/test/demos/vk/vk_test.cpp +++ b/util/test/demos/vk/vk_test.cpp @@ -391,15 +391,17 @@ bool VulkanGraphicsTest::IsSupported() return true; static bool glslcChecked = false; + static bool glslcSupported = false; if(!glslcChecked) { - static bool glslcSupported = SpvCompilationSupported(); - - if(!glslcSupported) - return false; + glslcChecked = true; + glslcSupported = SpvCompilationSupported(); } + if(!glslcSupported) + return false; + return volkInitialize() == VK_SUCCESS; }