summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-23 08:24:30 -0700
committerBrian <[email protected]>2008-01-23 08:24:30 -0700
commit2444f6c6a4c2f54c3198882c2256419628ca49d1 (patch)
tree7386cf37685f593db6e3d2be7f84d51e168445c5
parent46a787ad979e16b827caad5a123b41f8f59327f1 (diff)
gallium: fix computation of raster.point_size_per_vertex flag
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c15
1 files changed, 14 insertions, 1 deletions
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
*/