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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user