nvk: Return 0 for opaque memory capture replay.

If implementation does not actually replay the VA, it must return 0
to not violate:

"If the memory object was allocated with a non-zero value of
opaqueCaptureAddress, the return value must be the same address."

Fixes RenderDoc capture replay, which asserts on the this spec rule
being followed.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Fixes: ed6d5c33 ("nvk: Implement VK_EXT/KHR_buffer_device_address")
Reviewed-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com>
Closes #13784

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37047>
This commit is contained in:
Hans-Kristian Arntzen 2025-08-28 11:46:48 +02:00 committed by Marge Bot
parent c0cfd16da6
commit 6fbe2be7a7

View file

@ -433,7 +433,6 @@ nvk_GetDeviceMemoryOpaqueCaptureAddress(
UNUSED VkDevice device,
const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo)
{
VK_FROM_HANDLE(nvk_device_memory, mem, pInfo->memory);
return mem->mem->va->addr;
/* Addresses are replayed at buffer and image creation, not memory. */
return 0;
}