From 126513ed201a8430bfd2bcf27b5d0c3251e95cdc Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Wed, 18 Dec 2024 01:55:36 -0800 Subject: [PATCH] igl | tests | Ensure Vulkan Validation Layers are enabled in tests Reviewed By: mmaurer Differential Revision: D67364105 fbshipit-source-id: dc67edcb1daa483c3c847f301eccb44cbcb242db --- src/igl/tests/vulkan/Device.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/igl/tests/vulkan/Device.cpp b/src/igl/tests/vulkan/Device.cpp index 41181e638a..a98b458a1e 100644 --- a/src/igl/tests/vulkan/Device.cpp +++ b/src/igl/tests/vulkan/Device.cpp @@ -188,6 +188,15 @@ TEST_F(DeviceVulkanTest, CurrentThreadIdTest) { ctx.ensureCurrentContextThread(); } +TEST_F(DeviceVulkanTest, EnsureValidation) { +#if !defined(IGL_DISABLE_VALIDATION) + igl::vulkan::VulkanContext& ctx = + static_cast(iglDev_.get())->getVulkanContext(); + + ASSERT_TRUE(ctx.areValidationLayersEnabled()); +#endif // !defined(IGL_DISABLE_VALIDATION) +} + TEST_F(DeviceVulkanTest, UpdateGlslangResource) { const igl::vulkan::VulkanContext& ctx = static_cast(iglDev_.get())->getVulkanContext();