diff --git a/renderdoc/driver/vulkan/vk_layer.cpp b/renderdoc/driver/vulkan/vk_layer.cpp index f90f915946f..74b1b9363e0 100644 --- a/renderdoc/driver/vulkan/vk_layer.cpp +++ b/renderdoc/driver/vulkan/vk_layer.cpp @@ -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) { @@ -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();