panfrost: Use ctx->active_prim in panfrost_writes_point_size()
authorBoris Brezillon <boris.brezillon@collabora.com>
Fri, 6 Mar 2020 10:43:38 +0000 (11:43 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 10 Mar 2020 11:47:34 +0000 (12:47 +0100)
Check ctx->active_prim instead of prefix.draw_mode so we can eventually
get rid of ctx->payloads.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>

src/gallium/drivers/panfrost/pan_context.c

index 999823263f984197ad657f8acace1f0219dc778a..3683a907563f36e44e5adef572c7bca1c6f773ab 100644 (file)
@@ -158,7 +158,7 @@ panfrost_writes_point_size(struct panfrost_context *ctx)
         assert(ctx->shader[PIPE_SHADER_VERTEX]);
         struct panfrost_shader_state *vs = panfrost_get_shader_state(ctx, PIPE_SHADER_VERTEX);
 
-        return vs->writes_point_size && ctx->payloads[PIPE_SHADER_FRAGMENT].prefix.draw_mode == MALI_POINTS;
+        return vs->writes_point_size && ctx->active_prim == PIPE_PRIM_POINTS;
 }
 
 void