freedreno: Add PIPE_CAP_HAS_CONST_BW support

Allow for tiled layouts rather than having mesa/st force us back to
linear.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
This commit is contained in:
Rob Clark 2023-09-28 13:22:55 -07:00 committed by Marge Bot
parent 5cccd6d689
commit c1968e54d9
2 changed files with 6 additions and 0 deletions

View file

@ -1283,6 +1283,11 @@ get_best_layout(struct fd_screen *screen,
if (tmpl->bind & PIPE_BIND_USE_FRONT_RENDERING)
ubwc_ok = false;
/* Disallow UBWC when asked not to use data dependent bandwidth compression:
*/
if (tmpl->bind & PIPE_BIND_CONST_BW)
ubwc_ok = false;
if (ubwc_ok && !can_implicit &&
!drm_find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count)) {
perf_debug("%" PRSC_FMT

View file

@ -249,6 +249,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
case PIPE_CAP_GL_SPIRV:
case PIPE_CAP_FBFETCH_COHERENT:
case PIPE_CAP_HAS_CONST_BW:
return 1;
case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS: