mesa/st: only flag pointsize constant uploads if they're needed
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 31 Mar 2022 16:31:29 +0000 (12:31 -0400)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 8 Apr 2022 01:56:10 +0000 (21:56 -0400)
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@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15699>

src/mesa/state_tracker/st_atom.c

index 9326eb9..cc23b05 100644 (file)
@@ -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) {