Mesa (main): etnaviv: use feature bit to check for big tile support
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Apr 27 09:19:02 UTC 2022
Module: Mesa
Branch: main
Commit: 2d2f9572c24ff99822efc8b1e7108de482b197e3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d2f9572c24ff99822efc8b1e7108de482b197e3
Author: Lucas Stach <l.stach at pengutronix.de>
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 <l.stach at pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
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. */
More information about the mesa-commit
mailing list