st/mesh: handle mesh shader point size

This sets the per-vertex point size state correctly in the presence of mesh shaders.

(fixes line is just a educated pick)

Fixes: 51d6e4404a ("mesa: allow NULL for vertex shader when mesh pipeline")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
(cherry picked from commit 5bfaf7536a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40752>
This commit is contained in:
Dave Airlie 2026-03-17 16:04:32 +10:00 committed by Eric Engestrom
parent 18606773fe
commit 1cfb84c060
2 changed files with 9 additions and 1 deletions

View file

@ -6374,7 +6374,7 @@
"description": "st/mesh: handle mesh shader point size",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "51d6e4404aeb3a8e3c7eeb39584d590099a17402",
"notes": null

View file

@ -104,6 +104,14 @@ st_point_size_per_vertex(struct gl_context *ctx)
VARYING_BIT_PSIZ);
}
}
const struct gl_program *meshProg = ctx->MeshProgram._Current;
if (meshProg) {
if (meshProg->info.outputs_written &
VARYING_BIT_PSIZ) {
/* generated program which emits point size */
return true;
}
}
return false;
}