From 44d9c41b6bde59cee022637f4a917884f06f36ba Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 12 Jul 2022 15:08:39 -0400 Subject: [PATCH] panfrost: Revert provoking vertex assertion b6a30b72ab3 ("panfrost: Implement provoking vertices on Valhall") added an assertion that every draw selects a particular provoking vertex. The intent was to ensure provoking vertex selection actually happened. Unfortunately, the assertion is too strong, as the provoking vertex is irrelevant for some (most) draws. For those, we don't *want* to commit to a particular provoking vertex for those to avoid flushing. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/panfrost/pan_cmdstream.c | 7 ------- src/gallium/drivers/panfrost/pan_job.h | 10 ---------- 2 files changed, 17 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 478d1410ce4..86da15bd42c 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -3101,13 +3101,6 @@ panfrost_batch_get_bifrost_tiler(struct panfrost_batch *batch, unsigned vertex_c mali_ptr heap = t.gpu; - /* We emit this descriptor after the first draw. The provoking vertex - * for the batch should have already been set (on Valhall, where it is a - * property of the batch). - */ - if (PAN_ARCH >= 9) - assert(pan_tristate_is_defined(batch->first_provoking_vertex)); - t = pan_pool_alloc_desc(&batch->pool.base, TILER_CONTEXT); GENX(pan_emit_tiler_ctx)(dev, batch->key.width, batch->key.height, util_framebuffer_get_num_samples(&batch->key), diff --git a/src/gallium/drivers/panfrost/pan_job.h b/src/gallium/drivers/panfrost/pan_job.h index 3f2d291aa76..6a41aeb2bde 100644 --- a/src/gallium/drivers/panfrost/pan_job.h +++ b/src/gallium/drivers/panfrost/pan_job.h @@ -79,16 +79,6 @@ pan_tristate_get(struct pan_tristate state) return (state.v == PAN_TRISTATE_TRUE); } -/* - * Check whether a tristate has a defined value (not PAN_TRISTATE_DONTCARE). If - * true, pan_tristate_get will return a defined value. - */ -static inline bool -pan_tristate_is_defined(struct pan_tristate state) -{ - return (state.v != PAN_TRISTATE_DONTCARE); -} - /* A panfrost_batch corresponds to a bound FBO we're rendering to, * collecting over multiple draws. */