diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h b/src/gallium/drivers/etnaviv/etnaviv_debug.h index 693c36fd237..298f2ddb2e4 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_debug.h +++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h @@ -55,6 +55,7 @@ #define ETNA_DBG_DEQP 0x800000 /* Hacks to run dEQP GLES3 tests */ #define ETNA_DBG_NOCACHE 0x1000000 /* Disable shader cache */ #define ETNA_DBG_NO_LINEAR_PE 0x2000000 /* Disable linear PE */ +#define ETNA_DBG_MSAA 0x4000000 /* Enable MSAA */ extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index dadd57d7fac..965dd337efd 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -73,6 +73,7 @@ static const struct debug_named_value etna_debug_options[] = { {"deqp", ETNA_DBG_DEQP, "Hacks to run dEQP GLES3 tests"}, /* needs MESA_GLES_VERSION_OVERRIDE=3.0 */ {"nocache", ETNA_DBG_NOCACHE, "Disable shader cache"}, {"no_linear_pe", ETNA_DBG_NO_LINEAR_PE, "Disable linear PE"}, + {"msaa", ETNA_DBG_MSAA, "Enable MSAA support"}, DEBUG_NAMED_VALUE_END }; @@ -496,6 +497,10 @@ gpu_supports_render_format(struct etna_screen *screen, enum pipe_format format, return false; if (sample_count > 1) { + /* Explicitly enabled. */ + if (!DBG_ENABLED(ETNA_DBG_MSAA)) + return false; + /* The hardware supports it. */ if (!VIV_FEATURE(screen, chipFeatures, MSAA)) return false;