summaryrefslogtreecommitdiffstats
path: root/tools/gfx/vulkan/vk-device.cpp
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-05-16 14:51:46 -0700
committerGitHub <noreply@github.com>2025-05-16 16:51:46 -0500
commit8f20632a0ba45c3bfada293842e55129949a2ae9 (patch)
tree1c725aa8595780f067f5ad8cf60d6334bd9a1797 /tools/gfx/vulkan/vk-device.cpp
parentda951e06e7eb8ad1b9c91d6176be8165ea4f2b45 (diff)
Enable Windows full debug testsuite in CI (#7085)
* Unify Debug Layer Control Logic and Add Disable Option for Debug Builds This PR refactors and unifies the debug layer control logic in slang-test. A new `-disable-debug-layers` option is introduced, allowing debug builds to skip enabling the validation (debug) layer. This is currently needed to ensure stability in the debug test suite. Previously, different toggles such as ENABLE_VALIDATION_LAYER, ENABLE_DEBUG_LAYER, and debugLayerEnabled were used inconsistently across different components of slang-test. This PR standardizes the logic by using a single variable, debugLayerEnabled, to control the enabling/disabling of the debug layer internally. Notes: By default, the debug/validation layer is enabled in debug builds and is not supported in release builds of slang-test. Fixes: #7132 * Disable spirv-opt for the DebugFunctionDefinition issue * Run debug build only in GCP machines * Fix VUID-vkCmdPipelineBarrier-pBufferMemoryBarriers-02818 dstAcessMask can't include VK_ACCESS_TRANSFER_READ_BIT when stage mask has VK_PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_KHR * Set failed retry limit to 32 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'tools/gfx/vulkan/vk-device.cpp')
-rw-r--r--tools/gfx/vulkan/vk-device.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/gfx/vulkan/vk-device.cpp b/tools/gfx/vulkan/vk-device.cpp
index b9ca76493..d056e3984 100644
--- a/tools/gfx/vulkan/vk-device.cpp
+++ b/tools/gfx/vulkan/vk-device.cpp
@@ -214,7 +214,8 @@ Result DeviceImpl::initVulkanInstanceAndDevice(
#endif
}
- if (ENABLE_VALIDATION_LAYER || isGfxDebugLayerEnabled())
+ gfxEnableDebugLayer(useValidationLayer);
+ if (isGfxDebugLayerEnabled())
instanceExtensions.add(VK_EXT_DEBUG_REPORT_EXTENSION_NAME);
VkInstanceCreateInfo instanceCreateInfo = {VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO};
@@ -1027,7 +1028,7 @@ SlangResult DeviceImpl::initialize(const Desc& desc)
descriptorSetAllocator.m_api = &m_api;
initDeviceResult = initVulkanInstanceAndDevice(
desc.existingDeviceHandles.handles,
- ENABLE_VALIDATION_LAYER != 0 || isGfxDebugLayerEnabled());
+ isGfxDebugLayerEnabled());
if (initDeviceResult == SLANG_OK)
break;
}