freedreno: Use LINEAR for staging resources

These are for CPU access, so no point in having additional staging blit
to convert from/to linear.  Depth formats are an exception, as normally
they cannot be linear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30064>
This commit is contained in:
Rob Clark
2024-07-08 14:18:39 -07:00
committed by Marge Bot
parent 5de33f3d3e
commit fb9d86299b
@@ -1263,6 +1263,10 @@ get_best_layout(struct fd_screen *screen,
if (tmpl->target == PIPE_BUFFER)
return LINEAR;
if ((tmpl->usage == PIPE_USAGE_STAGING) &&
!util_format_is_depth_or_stencil(tmpl->format))
return LINEAR;
if (tmpl->bind & PIPE_BIND_LINEAR) {
if (tmpl->usage != PIPE_USAGE_STAGING)
perf_debug("%" PRSC_FMT ": forcing linear: bind flags",