diff --git a/src/gallium/drivers/etnaviv/etnaviv_debug.h b/src/gallium/drivers/etnaviv/etnaviv_debug.h index 92315b15f73..4abdeea1396 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_debug.h +++ b/src/gallium/drivers/etnaviv/etnaviv_debug.h @@ -46,17 +46,15 @@ #define ETNA_DBG_NO_SUPERTILE 0x4000 /* Disable supertile */ #define ETNA_DBG_NO_EARLY_Z 0x8000 /* Disable early z */ #define ETNA_DBG_CFLUSH_ALL 0x10000 /* Flush before every state update + draw call */ -#define ETNA_DBG_MSAA_2X 0x20000 /* Force 2X MSAA for screen */ -#define ETNA_DBG_MSAA_4X 0x40000 /* Force 4X MSAA for screen */ -#define ETNA_DBG_FINISH_ALL 0x80000 /* Finish on every flush */ -#define ETNA_DBG_FLUSH_ALL 0x100000 /* Flush after every rendered primitive */ -#define ETNA_DBG_ZERO 0x200000 /* Zero all resources after allocation */ -#define ETNA_DBG_DRAW_STALL 0x400000 /* Stall FE/PE after every draw op */ -#define ETNA_DBG_SHADERDB 0x800000 /* dump program compile information */ -#define ETNA_DBG_NO_SINGLEBUF 0x1000000 /* disable single buffer feature */ -#define ETNA_DBG_DEQP 0x2000000 /* Hacks to run dEQP GLES3 tests */ -#define ETNA_DBG_NOCACHE 0x4000000 /* Disable shader cache */ -#define ETNA_DBG_NO_LINEAR_PE 0x8000000 /* Disable linear PE */ +#define ETNA_DBG_FINISH_ALL 0x20000 /* Finish on every flush */ +#define ETNA_DBG_FLUSH_ALL 0x40000 /* Flush after every rendered primitive */ +#define ETNA_DBG_ZERO 0x80000 /* Zero all resources after allocation */ +#define ETNA_DBG_DRAW_STALL 0x100000 /* Stall FE/PE after every draw op */ +#define ETNA_DBG_SHADERDB 0x200000 /* dump program compile information */ +#define ETNA_DBG_NO_SINGLEBUF 0x400000 /* disable single buffer feature */ +#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 */ extern int etna_mesa_debug; /* set in etnaviv_screen.c from ETNA_MESA_DEBUG */ diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c index 707317b43c0..74a546e3b1e 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_resource.c +++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c @@ -268,18 +268,9 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, templat->last_level, templat->nr_samples, templat->usage, templat->bind, templat->flags); - /* Determine scaling for antialiasing, allow override using debug flag */ - int nr_samples = templat->nr_samples; - if ((templat->bind & (PIPE_BIND_RENDER_TARGET | PIPE_BIND_DEPTH_STENCIL)) && - !(templat->bind & PIPE_BIND_SAMPLER_VIEW)) { - if (DBG_ENABLED(ETNA_DBG_MSAA_2X)) - nr_samples = 2; - if (DBG_ENABLED(ETNA_DBG_MSAA_4X)) - nr_samples = 4; - } - + /* Determine scaling for antialiasing */ int msaa_xscale = 1, msaa_yscale = 1; - if (!translate_samples_to_xyscale(nr_samples, &msaa_xscale, &msaa_yscale)) { + if (!translate_samples_to_xyscale(templat->nr_samples, &msaa_xscale, &msaa_yscale)) { /* Number of samples not supported */ return NULL; } @@ -294,7 +285,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout, rsc->base = *templat; rsc->base.screen = pscreen; - rsc->base.nr_samples = nr_samples; + rsc->base.nr_samples = templat->nr_samples; rsc->layout = layout; rsc->halign = halign; rsc->explicit_flush = true; diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index c9684a58b2e..62ebfa7b336 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -65,8 +65,6 @@ static const struct debug_named_value etna_debug_options[] = { {"no_supertile", ETNA_DBG_NO_SUPERTILE, "Disable supertiles"}, {"no_early_z", ETNA_DBG_NO_EARLY_Z, "Disable early z"}, {"cflush_all", ETNA_DBG_CFLUSH_ALL, "Flush every cache before state update"}, - {"msaa2x", ETNA_DBG_MSAA_2X, "Force 2x msaa"}, - {"msaa4x", ETNA_DBG_MSAA_4X, "Force 4x msaa"}, {"flush_all", ETNA_DBG_FLUSH_ALL, "Flush after every rendered primitive"}, {"zero", ETNA_DBG_ZERO, "Zero all resources after allocation"}, {"draw_stall", ETNA_DBG_DRAW_STALL, "Stall FE/PE after each rendered primitive"},