Module: Mesa Branch: main Commit: 2d2f9572c24ff99822efc8b1e7108de482b197e3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d2f9572c24ff99822efc8b1e7108de482b197e3
Author: Lucas Stach <[email protected]> Date: Sun Apr 10 13:14:09 2022 +0200 etnaviv: use feature bit to check for big tile support 128B/256B tile support is not a HALTI5 property, but has its own separate feature bit. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9255> --- src/gallium/drivers/etnaviv/etnaviv_resource.c | 4 ++-- src/gallium/drivers/etnaviv/etnaviv_state.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index e114e2fc2f6..9b15176afd2 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -86,7 +86,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen, struct etna_screen *screen = etna_screen(pscreen); size_t rt_ts_size, ts_layer_stride; size_t bytes_per_tile; - uint8_t ts_mode = TS_MODE_128B; /* only used by halti5 */ + uint8_t ts_mode = TS_MODE_128B; int8_t ts_compress_fmt; assert(!rsc->ts_bo); @@ -98,7 +98,7 @@ etna_screen_resource_alloc_ts(struct pipe_screen *pscreen, ts_compress_fmt = (screen->specs.v4_compression || rsc->base.nr_samples > 1) ? translate_ts_format(rsc->base.format) : -1; - if (screen->specs.halti >= 5) { + if (VIV_FEATURE(screen, chipMinorFeatures6, CACHE128B256BPERLINE)) { /* enable 256B ts mode with compression, as it improves performance * the size of the resource might also determine if we want to use it or not */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index 0c63c8fc698..ffc9b741368 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -159,8 +159,9 @@ etna_set_framebuffer_state(struct pipe_context *pctx, cs->PE_COLOR_FORMAT |= VIVS_PE_COLOR_FORMAT_COMPONENTS__MASK | VIVS_PE_COLOR_FORMAT_OVERWRITE | - COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED) | - COND(color_supertiled && screen->specs.halti >= 5, VIVS_PE_COLOR_FORMAT_SUPER_TILED_NEW); + COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED); + if (VIV_FEATURE(screen, chipMinorFeatures6, CACHE128B256BPERLINE)) + cs->PE_COLOR_FORMAT |= COND(color_supertiled, VIVS_PE_COLOR_FORMAT_SUPER_TILED_NEW); /* VIVS_PE_COLOR_FORMAT_COMPONENTS() and * VIVS_PE_COLOR_FORMAT_OVERWRITE comes from blend_state * but only if we set the bits above. */
