Mesa (main): mesa/st: only flag pointsize constant uploads if they're needed
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 02:28:11 UTC 2022
Module: Mesa
Branch: main
Commit: 4f027fbff234140b5c89831312c4715d78d3ed41
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f027fbff234140b5c89831312c4715d78d3ed41
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Mar 31 12:31:29 2022 -0400
mesa/st: only flag pointsize constant uploads if they're needed
now that shaders are guaranteed to have a pointsize export, the only time
the variant using the uploaded constant is needed is when pointsize != 1.0
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.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 9326eb9a282..cc23b054390 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -148,7 +148,8 @@ static void check_program_state( struct st_context *st )
dirty |= ST_NEW_SCISSOR;
}
- if (st->lower_point_size && st->ctx->LastVertexStageDirty && !st->ctx->VertexProgram.PointSizeEnabled) {
+ if (st->lower_point_size && st->ctx->LastVertexStageDirty &&
+ !st->ctx->VertexProgram.PointSizeEnabled && !st->ctx->PointSizeIsOne) {
if (new_gp) {
st->dirty |= ST_NEW_GS_CONSTANTS;
} else if (new_tep) {
More information about the mesa-commit
mailing list