From 3909b160002ab9cd09e3e6da728d4da5d4afc824 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 30 Dec 2019 12:55:50 -0500 Subject: [PATCH] panfrost: Respect glPointSize() We have native support for this somehow. Fixes the mesa demo `points` Signed-off-by: Alyssa Rosenzweig --- src/gallium/drivers/panfrost/pan_context.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 14c6fcbd155..984294b0b29 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -881,7 +881,11 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data) * don't touch primitive_size (since we would clobber * the pointer there) */ - ctx->payloads[PIPE_SHADER_FRAGMENT].primitive_size.constant = ctx->rasterizer->base.line_width; + bool points = ctx->payloads[PIPE_SHADER_FRAGMENT].prefix.draw_mode == MALI_POINTS; + + ctx->payloads[PIPE_SHADER_FRAGMENT].primitive_size.constant = points ? + ctx->rasterizer->base.point_size : + ctx->rasterizer->base.line_width; } } -- 2.30.2