Module: Mesa
Branch: staging/23.2
Commit: ab94478a1f5b8b6e5aa20f7636a023db6a9ebb02
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab94478a1f5b8b6e5aa20f7636a023db6a9ebb02

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Aug 16 06:41:48 2023 -0400

zink: always trace_screen_unwrap in acquire

it's possible for acquire to be called from the frontend, in which
case the screen will still be trace-wrapped

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25288>
(cherry picked from commit 207b37bfd9b773043819c2cea6eaf57557bba57d)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_kopper.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 31b434700aa..19b1653d2d0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -554,7 +554,7 @@
         "description": "zink: always trace_screen_unwrap in acquire",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null,
         "notes": null
diff --git a/src/gallium/drivers/zink/zink_kopper.c 
b/src/gallium/drivers/zink/zink_kopper.c
index e5386b5e4b1..66166dfa7b4 100644
--- a/src/gallium/drivers/zink/zink_kopper.c
+++ b/src/gallium/drivers/zink/zink_kopper.c
@@ -23,6 +23,7 @@
  */
 
 #include "util/detect_os.h"
+#include "driver_trace/tr_screen.h"
 
 #include "zink_context.h"
 #include "zink_screen.h"
@@ -607,7 +608,7 @@ zink_kopper_acquire(struct zink_context *ctx, struct 
zink_resource *res, uint64_
    const struct kopper_swapchain *cswap = cdt->swapchain;
    res->obj->new_dt |= res->base.b.width0 != cswap->scci.imageExtent.width ||
                        res->base.b.height0 != cswap->scci.imageExtent.height;
-   VkResult ret = kopper_acquire(zink_screen(ctx->base.screen), res, timeout);
+   VkResult ret = 
kopper_acquire(zink_screen(trace_screen_unwrap(ctx->base.screen)), res, 
timeout);
    if (ret == VK_SUCCESS || ret == VK_SUBOPTIMAL_KHR) {
       if (cswap != cdt->swapchain) {
          ctx->swapchain_size = cdt->swapchain->scci.imageExtent;

Reply via email to