Module: Mesa Branch: main Commit: 74d088647527c0aa1b62cb88d374480d051b9c0f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=74d088647527c0aa1b62cb88d374480d051b9c0f
Author: Iago Toral Quiroga <[email protected]> Date: Tue Apr 4 10:12:02 2023 +0200 v3dv: drop unused parameter Reviewed-by: Alejandro PiƱeiro <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22283> --- src/broadcom/vulkan/v3dv_device.c | 16 ++++++---------- src/broadcom/vulkan/v3dv_private.h | 3 +-- src/broadcom/vulkan/v3dv_wsi.c | 3 +-- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index f6e8f006756..fb82b54e9a9 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -589,8 +589,7 @@ create_display_fd_wayland(VkIcdSurfaceBase *surface) * and platform to use. It should work in most cases. */ static void -acquire_display_device_no_surface(struct v3dv_instance *instance, - struct v3dv_physical_device *pdevice) +acquire_display_device_no_surface(struct v3dv_physical_device *pdevice) { #ifdef VK_USE_PLATFORM_WAYLAND_KHR pdevice->display_fd = create_display_fd_wayland(NULL); @@ -613,8 +612,7 @@ acquire_display_device_no_surface(struct v3dv_instance *instance, * display and platform combination. */ static void -acquire_display_device_surface(struct v3dv_instance *instance, - struct v3dv_physical_device *pdevice, +acquire_display_device_surface(struct v3dv_physical_device *pdevice, VkIcdSurfaceBase *surface) { /* Mesa will set both of VK_USE_PLATFORM_{XCB,XLIB} when building with @@ -646,8 +644,7 @@ acquire_display_device_surface(struct v3dv_instance *instance, * we can use to allocate BOs for presentable images. */ VkResult -v3dv_physical_device_acquire_display(struct v3dv_instance *instance, - struct v3dv_physical_device *pdevice, +v3dv_physical_device_acquire_display(struct v3dv_physical_device *pdevice, VkIcdSurfaceBase *surface) { VkResult result = VK_SUCCESS; @@ -661,9 +658,9 @@ v3dv_physical_device_acquire_display(struct v3dv_instance *instance, */ #if !using_v3d_simulator if (surface) - acquire_display_device_surface(instance, pdevice, surface); + acquire_display_device_surface(pdevice, surface); else - acquire_display_device_no_surface(instance, pdevice); + acquire_display_device_no_surface(pdevice); if (pdevice->display_fd == -1) result = VK_ERROR_INITIALIZATION_FAILED; @@ -2252,10 +2249,9 @@ device_alloc_for_wsi(struct v3dv_device *device, * display device and we need to do it now. */ VkResult result; - struct v3dv_instance *instance = device->instance; struct v3dv_physical_device *pdevice = device->pdevice; if (unlikely(pdevice->display_fd < 0)) { - result = v3dv_physical_device_acquire_display(instance, pdevice, NULL); + result = v3dv_physical_device_acquire_display(pdevice, NULL); if (result != VK_SUCCESS) return result; } diff --git a/src/broadcom/vulkan/v3dv_private.h b/src/broadcom/vulkan/v3dv_private.h index eb4c39802e9..91c1ec2f685 100644 --- a/src/broadcom/vulkan/v3dv_private.h +++ b/src/broadcom/vulkan/v3dv_private.h @@ -197,8 +197,7 @@ struct v3dv_physical_device { } caps; }; -VkResult v3dv_physical_device_acquire_display(struct v3dv_instance *instance, - struct v3dv_physical_device *pdevice, +VkResult v3dv_physical_device_acquire_display(struct v3dv_physical_device *pdevice, VkIcdSurfaceBase *surface); static inline struct v3dv_bo * diff --git a/src/broadcom/vulkan/v3dv_wsi.c b/src/broadcom/vulkan/v3dv_wsi.c index 70df881c88a..d22f51f43b2 100644 --- a/src/broadcom/vulkan/v3dv_wsi.c +++ b/src/broadcom/vulkan/v3dv_wsi.c @@ -127,12 +127,11 @@ v3dv_CreateSwapchainKHR( VkSwapchainKHR* pSwapchain) { V3DV_FROM_HANDLE(v3dv_device, device, _device); - struct v3dv_instance *instance = device->instance; struct v3dv_physical_device *pdevice = device->pdevice; ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, pCreateInfo->surface); VkResult result = - v3dv_physical_device_acquire_display(instance, pdevice, surface); + v3dv_physical_device_acquire_display(pdevice, surface); if (result != VK_SUCCESS) return result;
