Mesa (main): mesa/st: only use constant upload pointsize variants if pointsize != 1.0
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 02:28:11 UTC 2022
Module: Mesa
Branch: main
Commit: f964881fcc41925645fa271a465a7369cd6572ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f964881fcc41925645fa271a465a7369cd6572ac
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Mar 31 12:40:28 2022 -0400
mesa/st: only use constant upload pointsize variants if pointsize != 1.0
it's not that common for apps to need varying pointsize, so now that shaders
are guaranteed to have the export in the shader, the constant version is almost
never used
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
---
src/mesa/state_tracker/st_atom_shader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c
index f972ffc604d..678673537b0 100644
--- a/src/mesa/state_tracker/st_atom_shader.c
+++ b/src/mesa/state_tracker/st_atom_shader.c
@@ -236,7 +236,7 @@ st_update_vp( struct st_context *st )
!st->ctx->TessEvalProgram._Current) {
/* _NEW_POINT */
if (st->lower_point_size)
- key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled;
+ key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne;
/* _NEW_TRANSFORM */
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
@@ -293,7 +293,7 @@ st_update_common_program(struct st_context *st, struct gl_program *prog,
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
if (st->lower_point_size)
- key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled;
+ key.export_point_size = !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne;
}
update_gl_clamp(st, prog, key.gl_clamp);
More information about the mesa-commit
mailing list