Mesa (main): zink: remove unnecessary code in kopper readback acquire

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 28 02:57:46 UTC 2022


Module: Mesa
Branch: main
Commit: 49d9a3605bc5b7b69a4549b4b6c57620a621d75d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=49d9a3605bc5b7b69a4549b4b6c57620a621d75d

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Jun 20 21:46:21 2022 -0400

zink: remove unnecessary code in kopper readback acquire

this used to be important but no longer is, so modify the loop
code to handle this case implicitly

Reviewed-by: Adam Jackson <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17149>

---

 src/gallium/drivers/zink/zink_kopper.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_kopper.c b/src/gallium/drivers/zink/zink_kopper.c
index bbec1c31072..88ca980679c 100644
--- a/src/gallium/drivers/zink/zink_kopper.c
+++ b/src/gallium/drivers/zink/zink_kopper.c
@@ -735,18 +735,11 @@ zink_kopper_acquire_readback(struct zink_context *ctx, struct zink_resource *res
    const struct kopper_swapchain *cswap = cdt->swapchain;
    uint32_t last_dt_idx = res->obj->last_dt_idx;
    VkResult ret = VK_SUCCESS;
-   if (!res->obj->acquire) {
-      ret = kopper_acquire(screen, res, UINT64_MAX);
-      if (is_swapchain_kill(ret)) {
-         kill_swapchain(ctx, res);
-         return false;
-      }
-   }
    /* if this hasn't been presented or if it has data, use this as the readback target */
    if (res->obj->last_dt_idx == UINT32_MAX || res->obj->dt_has_data)
       return false;
    while (res->obj->dt_idx != last_dt_idx) {
-      if (!zink_kopper_present_readback(ctx, res))
+      if (res->obj->dt_idx != UINT32_MAX && !zink_kopper_present_readback(ctx, res))
          break;
       do {
          ret = kopper_acquire(screen, res, 0);



More information about the mesa-commit mailing list