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:
parent
2b626af110
commit
f964881fcc
|
@ -236,7 +236,7 @@ st_update_vp( struct st_context *st )
|
||||||
!st->ctx->TessEvalProgram._Current) {
|
!st->ctx->TessEvalProgram._Current) {
|
||||||
/* _NEW_POINT */
|
/* _NEW_POINT */
|
||||||
if (st->lower_point_size)
|
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 */
|
/* _NEW_TRANSFORM */
|
||||||
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
|
if (st->lower_ucp && st_user_clip_planes_enabled(st->ctx))
|
||||||
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
|
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;
|
key.lower_ucp = st->ctx->Transform.ClipPlanesEnabled;
|
||||||
|
|
||||||
if (st->lower_point_size)
|
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);
|
update_gl_clamp(st, prog, key.gl_clamp);
|
||||||
|
|
Loading…
Reference in New Issue