Skip to content

Crash when calling vkCmdDrawIndexedIndirectCount loaded through GIPA #320

Closed
@zeux

Description

After migrating to Vulkan 1.2 I'm seeing a crash when calling vkCmdDrawIndexedIndirectCount (note, no KHR suffix), but only when validation layers are active and only when the function pointer is loaded using vkGetInstanceProcAddr.

If validation layers are not enabled, using either vkGetInstanceProcAddr or vkGetDeviceProcAddr results in a non-NULL function pointer, and calling this function pointer works.

If validation layers are enabled, using vkGetDeviceProcAddr results in a non-NULL function that goes to vulkan_layer_chassis::CmdDrawIndexedIndirectCount - and that works fine as well.

However, if validation layers are enabled and vkGetInstanceProcAddr is used to retrieve the function pointer, the returned (non-NULL!) function pointer goes to vulkan-1.dll to this shim:

00007FFD92838F36 48 8B 01             mov         rax,qword ptr [rcx]  
00007FFD92838F39 48 8B 49 10          mov         rcx,qword ptr [rcx+10h]  
00007FFD92838F3D FF A0 F0 08 00 00    jmp         qword ptr [rax+8F0h] 

And this shim crashes because the contents of [rax + 8F0h] is a NULL pointer, so the jump goes to a null address.

The loader was installed using NVidia Vulkan 1.2 beta driver; the metadata for vulkan-1.dll says that the version is 1.2.131.0.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions