turnip: Always use GMEM for feedback loops in autotuner

For ordinary feedback loops GMEM is a lot faster than sysmem since
we don't set SINGLE_PRIM mode.

For feedback loops with ordered rasterization GMEM should also be
faster.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15106>
This commit is contained in:
Danylo Piliaiev 2022-02-17 17:02:06 +02:00 committed by Marge Bot
parent ebc23ac963
commit 7e703e4428
1 changed files with 13 additions and 0 deletions

View File

@ -474,6 +474,19 @@ tu_autotune_use_bypass(struct tu_autotune *at,
const struct tu_render_pass *pass = cmd_buffer->state.pass;
const struct tu_framebuffer *framebuffer = cmd_buffer->state.framebuffer;
for (unsigned i = 0; i < pass->subpass_count; i++) {
const struct tu_subpass *subpass = &pass->subpasses[i];
/* GMEM works much faster in this case */
if (subpass->raster_order_attachment_access)
return false;
/* Would be very slow in sysmem mode because we have to enable
* SINGLE_PRIM_MODE(FLUSH_PER_OVERLAP_AND_OVERWRITE)
*/
if (subpass->feedback_loop_color || subpass->feedback_loop_ds)
return false;
}
/* If we would want to support buffers that could be submitted
* several times we would have to copy the sample counts of renderpasses
* after each submission of such buffer (like with u_trace support).