mesa/st: rework atom flagging when pointsize changes

if the driver requires pointsize uploads, only flag the last vertex
stage for updates, not all vertex stages

this should be functionally equivalent but without the unnecessary overhead
of also scanning the other stages

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15590>
This commit is contained in:
Mike Blumenkrantz 2022-03-28 17:08:30 -04:00 committed by Marge Bot
parent 206d2f3127
commit 452d4d00df
1 changed files with 8 additions and 2 deletions

View File

@ -176,8 +176,14 @@ st_invalidate_state(struct gl_context *ctx)
}
/* Update the vertex shader if ctx->Point was changed. */
if (st->lower_point_size && new_state & _NEW_POINT)
st->dirty |= ST_NEW_VS_STATE | ST_NEW_TES_STATE | ST_NEW_GS_STATE;
if (st->lower_point_size && new_state & _NEW_POINT) {
if (ctx->GeometryProgram._Current)
st->dirty |= ST_NEW_GS_STATE;
else if (ctx->TessEvalProgram._Current)
st->dirty |= ST_NEW_TES_STATE;
else
st->dirty |= ST_NEW_VS_STATE;
}
/* Which shaders are dirty will be determined manually. */
if (new_state & _NEW_PROGRAM) {