diff options
author | Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> | 2020-05-29 14:02:43 -0400 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-05-29 20:34:56 +0000 |
commit | 229084f5de848ea83c83b6d0743edfc90eddb428 (patch) | |
tree | 7dcc0f0e6a27f464e4a49eba4ac4d33149ece00b | |
parent | 4be2cd604bc601f90eb90625bb91a040659b6767 (diff) |
panfrost: Disable QUAD_STRIP/POLYGON on Bifrost
Support was dropped and now raises a DATA_INVALID_FAULT on G31. Unknown
if retained on other devices. GL_QUADS is still ok.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
-rw-r--r-- | src/gallium/drivers/panfrost/pan_context.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index af822877635..e0f5758d217 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1401,6 +1401,7 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags) { struct panfrost_context *ctx = rzalloc(screen, struct panfrost_context); struct pipe_context *gallium = (struct pipe_context *) ctx; + struct panfrost_device *dev = pan_device(screen); gallium->screen = screen; @@ -1472,8 +1473,15 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags) gallium->const_uploader = gallium->stream_uploader; assert(gallium->stream_uploader); - /* Midgard supports ES modes, plus QUADS/QUAD_STRIPS/POLYGON */ - ctx->draw_modes = (1 << (PIPE_PRIM_POLYGON + 1)) - 1; + /* All of our GPUs support ES mode. Midgard supports additionally + * QUADS/QUAD_STRIPS/POLYGON. Bifrost supports just QUADS. */ + + ctx->draw_modes = (1 << (PIPE_PRIM_QUADS + 1)) - 1; + + if (!(dev->quirks & IS_BIFROST)) { + ctx->draw_modes |= (1 << PIPE_PRIM_QUAD_STRIP); + ctx->draw_modes |= (1 << PIPE_PRIM_POLYGON); + } ctx->primconvert = util_primconvert_create(gallium, ctx->draw_modes); |