From 1906cb610db83450da99d51f26f944371a61516b Mon Sep 17 00:00:00 2001 From: manon-traverse Date: Mon, 17 Aug 2026 10:49:25 +0200 Subject: [PATCH] vulkan(android): return a no-op vkFrameBoundaryANDROID instead of NULL RenderDoc does not implement VK_ANDROID_frame_boundary, so GetDeviceProcAddr returned NULL for vkFrameBoundaryANDROID. Apps that enable the extension and call the function unconditionally (e.g. some Adreno titles) then dereference a null pointer and crash while capturing. Return a no-op stub so the call is safe; RenderDoc already delimits frames via vkQueuePresentKHR. Co-Authored-By: Claude Opus 4.8 --- renderdoc/driver/vulkan/vk_layer.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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();