mesa: explicitly disallow multiple pointsize exports from generating

for the fixedfunc vertex case this is important since the fixedfunc shader
may have already added an (attenuated) pointsize

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>
This commit is contained in:
Mike Blumenkrantz 2022-06-20 14:39:36 -04:00 committed by Marge Bot
parent 096c5aa34a
commit 90586f812c
1 changed files with 2 additions and 0 deletions

View File

@ -1227,6 +1227,8 @@ st_can_add_pointsize_to_program(struct st_context *st, struct gl_program *prog)
assert(nir->info.stage == MESA_SHADER_VERTEX ||
nir->info.stage == MESA_SHADER_TESS_EVAL ||
nir->info.stage == MESA_SHADER_GEOMETRY);
if (nir->info.outputs_written & VARYING_BIT_PSIZ)
return false;
unsigned max_components = nir->info.stage == MESA_SHADER_GEOMETRY ?
st->ctx->Const.MaxGeometryTotalOutputComponents :
st->ctx->Const.Program[nir->info.stage].MaxOutputComponents;