From 27b0f64b3ed04c7ebf98405cd5515af44be9ee24 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 11 Jul 2025 07:03:39 -0700 Subject: [PATCH] freedreno/a6xx: Use handle for explicit layout Use the winsys_handle to get the fdl_explicit_layout params rather than relying on pre-populated layout params. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_resource.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc index d6f95e849de..22d2621544d 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc @@ -278,13 +278,13 @@ fd6_layout_resource(struct fd_resource *rsc, enum fd_layout_type type) } static bool -fill_ubwc_buffer_sizes(struct fd_resource *rsc) +fill_ubwc_buffer_sizes(struct fd_resource *rsc, struct winsys_handle *handle) { struct pipe_resource *prsc = &rsc->b.b; struct fd_screen *screen = fd_screen(prsc->screen); struct fdl_explicit_layout l = { - .offset = rsc->layout.slices[0].offset, - .pitch = rsc->layout.pitch0, + .offset = handle->offset, + .pitch = handle->stride, }; if (!can_do_ubwc(prsc)) @@ -306,7 +306,7 @@ fd6_layout_resource_for_handle(struct fd_resource *rsc, struct winsys_handle *ha { switch (handle->modifier) { case DRM_FORMAT_MOD_QCOM_COMPRESSED: - return fill_ubwc_buffer_sizes(rsc); + return fill_ubwc_buffer_sizes(rsc, handle); case DRM_FORMAT_MOD_LINEAR: if (can_do_ubwc(&rsc->b.b)) { perf_debug("%" PRSC_FMT