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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>
This commit is contained in:
Mike Blumenkrantz 2022-03-31 12:40:28 -04:00
parent 2b626af110
commit f964881fcc
1 changed files with 2 additions and 2 deletions

View File

@ -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);