From 490ddbd0b7867b5d43e81f0595d95dfc5fc7c6fc Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sat, 22 Oct 2022 12:47:29 -0400 Subject: [PATCH] lavapipe: fix BufferDeviceAddress usage this is supposed to return the address at the start of the buffer, not the address at the start of the memory allocation cc: mesa-stable Reviewed-by: Dave Airlie Part-of: --- src/gallium/frontends/lavapipe/lvp_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/frontends/lavapipe/lvp_image.c b/src/gallium/frontends/lavapipe/lvp_image.c index 4411941..290716b 100644 --- a/src/gallium/frontends/lavapipe/lvp_image.c +++ b/src/gallium/frontends/lavapipe/lvp_image.c @@ -440,7 +440,7 @@ VKAPI_ATTR VkDeviceAddress VKAPI_CALL lvp_GetBufferDeviceAddress( { LVP_FROM_HANDLE(lvp_buffer, buffer, pInfo->buffer); - return (VkDeviceAddress)(uintptr_t)buffer->pmem; + return (VkDeviceAddress)(uintptr_t)((char*)buffer->pmem + buffer->offset); } VKAPI_ATTR uint64_t VKAPI_CALL lvp_GetBufferOpaqueCaptureAddress( -- 2.7.4