[Minimal repro attached] vkCreateDevice fails if VK_NVX_binary_import is specified and a large Windows memory reservation has previously been made (original) (raw)
I was torn whether to post here, the Vulkan subforum, or the CUDA subforum. But since this extension is mainly used for DLSS (and I was trying to integrate DLSS when I discovered the issue), I decided this subforum would be best.
Step 1: Use VirtualAlloc2 to allocate a large (~1050GB) amount of reserved/placeholder memory.
Step 2: Call vkCreateDevice with an Nvidia GPU and with the VK_NVX_binary_import extension specified.
Step 3: Device creation will either fail (VK_ERROR_INITIALIZATION_FAILED) or there’ll be an access violation in vulkan-1.dll. The type of failure seems to depend on which layers are enabled, but it never succeeds.
If the allocation is not made, or if this extension is not requested when creating the device, or if the device is created (including the extension) BEFORE the allocation, then device creation works OK.
A repro is attached. Requirements:
- Visual Studio 2022 with Cmake and Clang tools
- Windows and Vulkan SDKs
- An Nvidia RTX card
If these requirements are met then the issue should be reproduced simply by using MSVC’s “Open Folder”, letting cmake run, setting the startup item to binaryImportIssueRepro.exe, and pressing “start debugging”.
This happens on a Windows 10 system with a 2080ti. I haven’t been able to test other systems yet.
I’m hoping to integrate DLSS into an open-source project, and this is blocking it… I’d be very grateful for any thoughts or suggestions!
binaryImportIssueRepro.zip (2.9 KB)