Mesa (main): mesa: explicitly disallow multiple pointsize exports from generating
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 13:53:25 UTC 2022
Module: Mesa
Branch: main
Commit: 90586f812c9013b49b9c3a2b93664d4707828b9d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=90586f812c9013b49b9c3a2b93664d4707828b9d
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Mon Jun 20 14:39:36 2022 -0400
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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17145>
---
src/mesa/state_tracker/st_program.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 3cd167ab095..955efccfa77 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -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;
More information about the mesa-commit
mailing list