panfrost: Disable shader-assisted indirect draws

Although it is passing all of dEQP-GLES31, it is failing a few
KHR-GLES31.* tests. It also has performance issues at the moment. Invert
the existing noindirect debug flag to become a indirect debug flag. Set
this flag for dEQP-GLES31 CI on G52, to make sure the code doesn't bit
rot on the hope someone will pick this up later on.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12478>
(cherry picked from commit a7f7d74137)

Conflicts:
	src/gallium/drivers/panfrost/pan_screen.c
	src/panfrost/lib/pan_util.h
This commit is contained in:
Alyssa Rosenzweig 2021-08-13 23:11:39 +00:00 committed by Dylan Baker
parent 4d3e06e55c
commit e3bcce01d9
5 changed files with 10 additions and 10 deletions

View file

@ -805,7 +805,7 @@
"description": "panfrost: Disable shader-assisted indirect draws",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -154,7 +154,7 @@ panfrost-g52-gles31:arm64:
- .lava-meson-g12b-a311d-khadas-vim3
variables:
DEQP_VER: gles31
PAN_MESA_DEBUG: "deqp,sync"
PAN_MESA_DEBUG: "deqp,sync,indirect"
DEQP_PARALLEL: 6
DEQP_EXPECTED_RENDERER: G52

View file

@ -3078,8 +3078,8 @@ panfrost_draw_vbo(struct pipe_context *pipe,
if (!panfrost_render_condition_check(ctx))
return;
/* Emulate indirect draws when debugging */
if (dev->debug & PAN_DBG_NOINDIRECT && indirect && indirect->buffer) {
/* Emulate indirect draws unless we're using the experimental path */
if (!(dev->debug & PAN_DBG_INDIRECT) && indirect && indirect->buffer) {
assert(num_draws == 1);
util_draw_indirect(pipe, info, indirect);
return;

View file

@ -67,7 +67,9 @@ static const struct debug_named_value panfrost_debug_options[] = {
{"noafbc", PAN_DBG_NO_AFBC, "Disable AFBC support"},
{"nocrc", PAN_DBG_NO_CRC, "Disable transaction elimination"},
{"msaa16", PAN_DBG_MSAA16, "Enable MSAA 8x and 16x support"},
{"noindirect", PAN_DBG_NOINDIRECT, "Emulate indirect draws on the CPU"},
{"indirect", PAN_DBG_INDIRECT, "Use experimental compute kernel for indirect draws"},
{"linear", PAN_DBG_LINEAR, "Force linear textures"},
{"nocache", PAN_DBG_NO_CACHE, "Disable BO cache"},
DEBUG_NAMED_VALUE_END
};
@ -836,10 +838,6 @@ panfrost_create_screen(int fd, struct renderonly *ro)
if (dev->arch == 7)
dev->quirks |= MIDGARD_NO_AFBC;
/* XXX: Indirect draws on Midgard need debugging, emulate for now */
if (dev->arch < 6)
dev->debug |= PAN_DBG_NOINDIRECT;
dev->ro = ro;
/* Check if we're loading against a supported GPU model. */

View file

@ -43,7 +43,9 @@
#define PAN_DBG_GL3 0x0100
#define PAN_DBG_NO_AFBC 0x0200
#define PAN_DBG_MSAA16 0x0400
#define PAN_DBG_NOINDIRECT 0x0800
#define PAN_DBG_INDIRECT 0x0800
#define PAN_DBG_LINEAR 0x1000
#define PAN_DBG_NO_CACHE 0x2000
struct panfrost_device;