diff --git a/.pick_status.json b/.pick_status.json index 1e3b35f4918..fbca5604554 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -264,7 +264,7 @@ "description": "kopper: fix bufferage/swapinterval handling for non-window swapchains", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt index 26dfa6d7e38..e9d05f3a463 100644 --- a/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt +++ b/src/gallium/drivers/zink/ci/zink-anv-tgl-fails.txt @@ -96,10 +96,6 @@ glx@glx_arb_create_context_es2_profile@invalid opengl es version,Fail glx@glx_arb_create_context_no_error@no error,Fail glx@glx_arb_create_context_robustness@invalid reset notification strategy,Fail -# See also the EGL buffer age failures -glx@glx-buffer-age,Fail -glx@glx-buffer-age vblank_mode=0,Fail - glx@glx-swap-pixmap-bad,Fail # ../src/gallium/drivers/zink/zink_kopper.c:859: zink_kopper_update: Assertion `pres->bind & PIPE_BIND_DISPLAY_TARGET' failed. diff --git a/src/gallium/frontends/dri/dri_drawable.h b/src/gallium/frontends/dri/dri_drawable.h index d759fcfbb64..041957035f8 100644 --- a/src/gallium/frontends/dri/dri_drawable.h +++ b/src/gallium/frontends/dri/dri_drawable.h @@ -88,6 +88,7 @@ struct dri_drawable struct kopper_loader_info info; __DRIimage *image; //texture_from_pixmap bool is_window; + bool window_valid; bool has_modifiers; /* hooks filled in by dri2 & drisw */ diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 70b9980b6f5..61893e7012c 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -606,6 +606,7 @@ XXX do this once swapinterval is hooked up assert(data); drawable->textures[statts[i]] = screen->base.screen->resource_create_drawable(screen->base.screen, &templ, data); + drawable->window_valid = !!drawable->textures[statts[i]]; } #ifdef VK_USE_PLATFORM_XCB_KHR else if (is_pixmap && statts[i] == ST_ATTACHMENT_FRONT_LEFT && !screen->is_sw) { @@ -928,6 +929,9 @@ kopperSetSwapInterval(__DRIdrawable *dPriv, int interval) drawable->textures[ST_ATTACHMENT_BACK_LEFT] : drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; + /* can't set swap interval on non-windows */ + if (!drawable->window_valid) + return; /* the conditional is because we can be called before buffer allocation. If * we're before allocation, then the initial_swap_interval will be used when * the swapchain is eventually created. @@ -946,6 +950,10 @@ kopperQueryBufferAge(__DRIdrawable *dPriv) drawable->textures[ST_ATTACHMENT_BACK_LEFT] : drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; + /* can't get buffer age from non-window swapchain */ + if (!drawable->window_valid) + return 0; + /* Wait for glthread to finish because we can't use pipe_context from * multiple threads. */