- if (vertProg) {
- if (vertProg->Base.Id == 0) {
- if (vertProg->Base.OutputsWritten & BITFIELD64_BIT(VARYING_SLOT_PSIZ)) {
- /* generated program which emits point size */
- raster->point_size_per_vertex = TRUE;
- }
- }
- else if (ctx->API != API_OPENGLES2) {
- /* PointSizeEnabled is always set in ES2 contexts */
- raster->point_size_per_vertex = ctx->VertexProgram.PointSizeEnabled;
- }
- else {
- /* ST_NEW_TESSEVAL_PROGRAM | ST_NEW_GEOMETRY_PROGRAM */
- /* We have to check the last bound stage and see if it writes psize */
- struct gl_program *last = NULL;
- if (ctx->GeometryProgram._Current)
- last = &ctx->GeometryProgram._Current->Base;
- else if (ctx->TessEvalProgram._Current)
- last = &ctx->TessEvalProgram._Current->Base;
- else if (ctx->VertexProgram._Current)
- last = &ctx->VertexProgram._Current->Base;
- if (last)
- raster->point_size_per_vertex =
- !!(last->OutputsWritten & BITFIELD64_BIT(VARYING_SLOT_PSIZ));
- }
- }