freedreno: Remove use of FDL_MIN_UBWC_WIDTH

fdl6_layout_image() already has the fallback-to-linear check.  And with
gen8 this is no longer a fixed constant.  So lets just consolidate all
the logic in fdl layout helper.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38655>
This commit is contained in:
Rob Clark
2025-11-06 15:43:21 -08:00
committed by Marge Bot
parent c6ad0f781a
commit 654b0dd548
2 changed files with 0 additions and 10 deletions

View File

@@ -1563,12 +1563,5 @@ fd6_tile_mode_for_format(enum pipe_format pfmt)
unsigned
fd6_tile_mode(const struct pipe_resource *tmpl)
{
/* if the mipmap level 0 is still too small to be tiled, then don't
* bother pretending:
*/
if ((tmpl->width0 < FDL_MIN_UBWC_WIDTH) &&
!util_format_is_depth_or_stencil(tmpl->format))
return TILE6_LINEAR;
return fd6_tile_mode_for_format(tmpl->format);
}

View File

@@ -1695,7 +1695,6 @@ fd_resource_from_memobj(struct pipe_screen *pscreen,
const struct pipe_resource *tmpl,
struct pipe_memory_object *pmemobj, uint64_t offset)
{
struct fd_screen *screen = fd_screen(pscreen);
struct fd_memory_object *memobj = fd_memory_object(pmemobj);
struct pipe_resource *prsc;
struct fd_resource *rsc;
@@ -1714,8 +1713,6 @@ fd_resource_from_memobj(struct pipe_screen *pscreen,
modifiers = metadata.modifier;
} else if (tmpl->bind & PIPE_BIND_LINEAR) {
modifiers = DRM_FORMAT_MOD_LINEAR;
} else if (is_a6xx(screen) && tmpl->width0 >= FDL_MIN_UBWC_WIDTH) {
modifiers = DRM_FORMAT_MOD_QCOM_COMPRESSED;
}
/* Allocate new pipe resource. */