-
Notifications
You must be signed in to change notification settings - Fork 459
Description
Environment:
- OS: Windows
- GPU and driver version: NVIDIA, Driver 581.240.0
- Vulkan API Version used: 1.4
- Vulkan SDK version: 1.4.335
Describe the Issue
A user of https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR, found that enabling printf_enable in the validation layer causes a crash (null pointer access) when calling vkCmdBindDescriptorSets2. Replacing the call with vkCmdBindDescriptorSets works.
Note: The same code works correctly when printf_enable = false.
Call stack shows:
VkLayer_khronos_validation.dll!vulkan_layer_chassis::CmdBindDescriptorSets2(...) Line 9739
Access violation reading location 0x0000000000000000.
Expected behavior
Both vkCmdBindDescriptorSets2 and vkCmdBindDescriptorSets should behave the same with printf_enable.
Repro
- Follow the Quick Start of vk_raytracing_tutorial_KHR
- Run
01_foundation— works fine - Enable printf in validation settings:
Modify the code to add the printf_enable
// Adding control on the validation layers
nvvk::ValidationSettings validationSettings;
validationSettings.setPreset(nvvk::ValidationSettings::LayerPresets::eStandard);
validationSettings.printf_enable = true;
vkSetup.instanceCreateInfoExt = validationSettings.buildPNextChain();This will crash in vkCmdBindDescriptorSets2.
Replacing it with the following will be properly executed by the validation layer.
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, m_graphicPipelineLayout, 0, 1,
m_descPack.getSetPtr(), 0, nullptr);