Mesa (master): panfrost: Simplify draw_flags

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Dec 3 04:44:05 UTC 2019


Module: Mesa
Branch: master
Commit: 6ddaa5558a66415d6f144bd4609324832c3466fb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ddaa5558a66415d6f144bd4609324832c3466fb

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Nov 22 11:45:13 2019 -0500

panfrost: Simplify draw_flags

Fixes dEQP-GLES3.functional.primitive_restart.*. Note the 0x18000 value
is accidentally somehow enabling primitive restart for some reason.
I'm not sure where this value came from but let's not.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>

---

 src/gallium/drivers/panfrost/pan_context.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 7ae4b692189..c28cb1c40e2 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1566,19 +1566,10 @@ panfrost_draw_vbo(
         if (info->primitive_restart)
                 draw_flags |= MALI_DRAW_PRIMITIVE_RESTART_FIXED_INDEX;
 
-        /* For higher amounts of vertices (greater than what fits in a 16-bit
-         * short), the other value is needed, otherwise there will be bizarre
-         * rendering artefacts. It's not clear what these values mean yet. This
-         * change is also needed for instancing and sometimes points (perhaps
-         * related to dynamically setting gl_PointSize) */
+        /* These doesn't make much sense */
 
-        bool is_points = mode == PIPE_PRIM_POINTS;
-        bool many_verts = ctx->vertex_count > 0xFFFF;
-        bool instanced = ctx->instance_count > 1;
+        draw_flags |= 0x3000;
 
-        draw_flags |= (is_points || many_verts || instanced) ? 0x3000 : 0x18000;
-
-        /* This doesn't make much sense */
         if (mode == PIPE_PRIM_LINE_STRIP) {
                 draw_flags |= 0x800;
         }




More information about the mesa-commit mailing list