Skip to content

Commit

Permalink
zink: set surface->dt when updating swapchain
Browse files Browse the repository at this point in the history
Apply commit
https://gitlab.freedesktop.org/mesa/mesa/-/commit/b2739c9f00557347008dfc500dcc584abb81378b

Maybe improve performance:
"this otherwise re-creates swapchain surfaces on every frame and has
a significant perf hit for no reason"
  • Loading branch information
alexvorxx committed Jan 11, 2023
1 parent 92fa25b commit 9bcc72c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gallium/drivers/zink/zink_surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ zink_surface_swapchain_update(struct zink_context *ctx, struct zink_surface *sur
surface->base.width = res->base.b.width0;
surface->base.height = res->base.b.height0;
init_surface_info(surface, res, &surface->ivci);

surface->dt = res->obj->dt;
}
if (!surface->swapchain[res->obj->dt_idx]) {
assert(res->obj->image && cdt->swapchain->images[res->obj->dt_idx] == res->obj->image);
Expand Down

0 comments on commit 9bcc72c

Please sign in to comment.