mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
zink: explicitly eliminate feedback loops for unused zsbufs
this avoids a GENERAL/FEEDBACK_LOOP layout transition where possible Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
This commit is contained in:
parent
618c3651ff
commit
a702e5038c
1 changed files with 3 additions and 0 deletions
|
|
@ -5651,6 +5651,9 @@ add_implicit_feedback_loop(struct zink_context *ctx, struct zink_resource *res)
|
|||
/* can only feedback loop with fb+sampler bind; image bind must be GENERAL */
|
||||
if (!res->fb_bind_count || !res->sampler_bind_count[0] || res->image_bind_count[0])
|
||||
return false;
|
||||
/* if zsbuf isn't used then it effectively has no fb binds */
|
||||
if (!(res->aspect & VK_IMAGE_ASPECT_COLOR_BIT) && !zink_is_zsbuf_used(ctx))
|
||||
return false;
|
||||
bool is_feedback = false;
|
||||
/* avoid false positives when a texture is bound but not used */
|
||||
u_foreach_bit(vkstage, res->gfx_barrier) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue