summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/etnaviv/etnaviv_screen.c
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2017-05-10 18:01:06 +0200
committerChristian Gmeiner <[email protected]>2017-05-16 21:07:46 +0200
commitf8a39914586de004759ea9cbda1335bdf0790cdc (patch)
tree35a7ad44c7340a62c9ec13ec7e5bd662a82bf848 /src/gallium/drivers/etnaviv/etnaviv_screen.c
parent20ce6f136188c24a019153e78c87872fb0a03060 (diff)
etnaviv: apply feature overrides in one central location
This way we can just test the feature bits and don't need to spread the debug overrides to all locations touching a feature. Signed-off-by: Lucas Stach <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_screen.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c
index d8a970b9105..9f1b44922ad 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
@@ -831,6 +831,16 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu,
if (!etna_get_specs(screen))
goto fail;
+ /* apply debug options that disable individual features */
+ if (DBG_ENABLED(ETNA_DBG_NO_EARLY_Z))
+ screen->features[viv_chipFeatures] |= chipFeatures_NO_EARLY_Z;
+ if (DBG_ENABLED(ETNA_DBG_NO_TS))
+ screen->features[viv_chipFeatures] &= ~chipFeatures_FAST_CLEAR;
+ if (DBG_ENABLED(ETNA_DBG_NO_AUTODISABLE))
+ screen->features[viv_chipMinorFeatures1] &= ~chipMinorFeatures1_AUTO_DISABLE;
+ if (DBG_ENABLED(ETNA_DBG_NO_SUPERTILE))
+ screen->specs.can_supertile = 0;
+
pscreen->destroy = etna_screen_destroy;
pscreen->get_param = etna_screen_get_param;
pscreen->get_paramf = etna_screen_get_paramf;