Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions renderdoc/driver/vulkan/vk_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,16 @@ VK_LAYER_RENDERDOC_CaptureEnumerateInstanceExtensionProperties(

// proc addr routines

// RenderDoc doesn't implement VK_ANDROID_frame_boundary. Some apps (e.g. Adreno
// titles like Asphalt 9) enable it and call vkFrameBoundaryANDROID unconditionally;
// returning NULL from GetDeviceProcAddr for it makes them dereference a null pointer
// and crash. Provide a no-op so the call is safe -- frames are still delimited by
// vkQueuePresentKHR for capture purposes. Mirrors gfxreconstruct's handling.
static VKAPI_ATTR void VKAPI_CALL renderdoc_noop_vkFrameBoundaryANDROID(VkDevice, VkSemaphore,
VkImage)
{
}

VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
VK_LAYER_RENDERDOC_CaptureGetDeviceProcAddr(VkDevice device, const char *pName)
{
Expand All @@ -434,6 +444,8 @@ VK_LAYER_RENDERDOC_CaptureGetDeviceProcAddr(VkDevice device, const char *pName)
return (PFN_vkVoidFunction)&hooked_vkCreateDevice;
if(!strcmp("vkDestroyDevice", pName))
return (PFN_vkVoidFunction)&hooked_vkDestroyDevice;
if(!strcmp("vkFrameBoundaryANDROID", pName))
return (PFN_vkVoidFunction)&renderdoc_noop_vkFrameBoundaryANDROID;

HookInitVulkanDevice();

Expand Down