mesa/st: precompile with API pointsize only if the shader doesn't have pointsize

this is a more accurate hint, and maintains the existing behavior given
subsequent changes to this area

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15228>
This commit is contained in:
Mike Blumenkrantz 2022-03-02 21:47:22 -05:00 committed by Marge Bot
parent 96098d7c25
commit 1183988d74
1 changed files with 2 additions and 1 deletions

View File

@ -2022,7 +2022,8 @@ st_precompile_shader_variant(struct st_context *st,
prog->Target == GL_TESS_EVALUATION_PROGRAM_NV ||
prog->Target == GL_GEOMETRY_PROGRAM_NV) {
if (st->lower_point_size && !st->ctx->VertexProgram.PointSizeEnabled)
key.export_point_size = is_last_vertex_stage(st->ctx, prog);
key.export_point_size = is_last_vertex_stage(st->ctx, prog) &&
!nir_find_variable_with_location(prog->nir, nir_var_shader_out, VARYING_SLOT_PSIZ);
}
key.st = st->has_shareable_shaders ? NULL : st;
st_get_common_variant(st, prog, &key);