From: Brian Date: Wed, 23 Jan 2008 15:24:30 +0000 (-0700) Subject: gallium: fix computation of raster.point_size_per_vertex flag X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2444f6c6a4c2f54c3198882c2256419628ca49d1;p=mesa.git gallium: fix computation of raster.point_size_per_vertex flag --- diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index beae36bca00..435d604af7e 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -74,6 +74,7 @@ static void update_raster_state( struct st_context *st ) GLcontext *ctx = st->ctx; struct pipe_rasterizer_state raster; const struct cso_rasterizer *cso; + const struct gl_vertex_program *vertProg = ctx->VertexProgram._Current; uint i; memset(&raster, 0, sizeof(raster)); @@ -210,7 +211,19 @@ static void update_raster_state( struct st_context *st ) raster.sprite_coord_mode[i] = PIPE_SPRITE_COORD_NONE; } } - raster.point_size_per_vertex = ctx->VertexProgram.PointSizeEnabled; + if (vertProg) { + if (vertProg->Base.Id == 0) { + if (vertProg->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) { + /* generated program which emits point size */ + raster.point_size_per_vertex = TRUE; + } + } + else if (ctx->VertexProgram.PointSizeEnabled) { + /* user-defined program and GL_VERTEX_PROGRAM_POINT_SIZE set */ + raster.point_size_per_vertex = ctx->VertexProgram.PointSizeEnabled; + } + } + /* _NEW_LINE */