From 8cabf134a85eb047e1dc26ea1e118df3ac31aee8 Mon Sep 17 00:00:00 2001 From: Charmaine Lee Date: Wed, 18 May 2022 15:33:05 -0700 Subject: [PATCH] svga: fix aa point Use in_prim from current geometry shader to check for point prim type when determine if aa point is enabled or not. Reviewed-by: Neha Bhende Part-of: --- src/gallium/drivers/svga/svga_state_fs.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/svga/svga_state_fs.c b/src/gallium/drivers/svga/svga_state_fs.c index 492a2cbdde0..3c09e19171b 100644 --- a/src/gallium/drivers/svga/svga_state_fs.c +++ b/src/gallium/drivers/svga/svga_state_fs.c @@ -169,14 +169,16 @@ make_fs_key(const struct svga_context *svga, key->fs.pstipple = (svga->curr.rast->templ.poly_stipple_enable && prim_mode == PIPE_PRIM_TRIANGLES); - key->fs.aa_point = (svga->curr.rast->templ.point_smooth && - prim_mode == PIPE_PRIM_POINTS && - (svga->curr.rast->pointsize > 1.0 || - shader->info.writes_psize)); + if (svga->curr.gs) { + key->fs.aa_point = (svga->curr.rast->templ.point_smooth && + shader->info.gs.in_prim == PIPE_PRIM_POINTS && + (svga->curr.rast->pointsize > 1.0 || + shader->info.writes_psize)); - if (key->fs.aa_point && svga->curr.gs) { - assert(svga->curr.gs->aa_point_coord_index != -1); - key->fs.aa_point_coord_index = svga->curr.gs->aa_point_coord_index; + if (key->fs.aa_point) { + assert(svga->curr.gs->aa_point_coord_index != -1); + key->fs.aa_point_coord_index = svga->curr.gs->aa_point_coord_index; + } } }