etnaviv: Remove possibility to force MSAA

st/mesa does not know anything about the forced MSAA and we end with
the following assert:
etna_try_rs_blit: Assertion `(blit_info->src.box.x + blit_info->src.box.width) * msaa_xscale <= src_lev->padded_width' failed

Let the application do its thing regarding MSAA and remove this 'debug'
feature.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19013>
This commit is contained in:
Christian Gmeiner 2022-07-05 14:12:57 +02:00 committed by Marge Bot
parent 7221cc6526
commit 6c0eff847d
3 changed files with 12 additions and 25 deletions

View file

@ -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 */

View file

@ -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;

View file

@ -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"},