Mesa (main): svga: fix aa point
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 19 17:56:40 UTC 2022
Module: Mesa
Branch: main
Commit: 8cabf134a85eb047e1dc26ea1e118df3ac31aee8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cabf134a85eb047e1dc26ea1e118df3ac31aee8
Author: Charmaine Lee <charmainel at vmware.com>
Date: Wed May 18 15:33:05 2022 -0700
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 <bhenden at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16598>
---
src/gallium/drivers/svga/svga_state_fs.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 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 (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 (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) {
+ assert(svga->curr.gs->aa_point_coord_index != -1);
+ key->fs.aa_point_coord_index = svga->curr.gs->aa_point_coord_index;
+ }
}
}
More information about the mesa-commit
mailing list