summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vb_points.c4
-rw-r--r--src/mesa/tnl/t_vb_program.c15
2 files changed, 14 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_vb_points.c b/src/mesa/tnl/t_vb_points.c
index 429a0ab7cb..a6757a8bf0 100644
--- a/src/mesa/tnl/t_vb_points.c
+++ b/src/mesa/tnl/t_vb_points.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_points.c,v 1.6 2002/01/06 03:54:12 brianp Exp $ */
+/* $Id: t_vb_points.c,v 1.7 2002/01/06 20:39:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -76,7 +76,7 @@ static GLboolean run_point_stage( GLcontext *ctx,
*/
static void check_point_size( GLcontext *ctx, struct gl_pipeline_stage *d )
{
- d->active = ctx->Point._Attenuated;
+ d->active = ctx->Point._Attenuated && !ctx->VertexProgram.Enabled;
}
static GLboolean alloc_point_data( GLcontext *ctx,
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index cfa1397d70..4dc5becb28 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -1,4 +1,4 @@
-/* $Id: t_vb_program.c,v 1.7 2002/01/06 03:54:12 brianp Exp $ */
+/* $Id: t_vb_program.c,v 1.8 2002/01/06 20:39:20 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -141,10 +141,17 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage )
struct vp_stage_data *store = VP_STAGE_DATA(stage);
struct vertex_buffer *VB = &tnl->vb;
struct vp_machine *machine = &(ctx->VertexProgram.Machine);
+ struct vp_program *program = ctx->VertexProgram.Current;
GLint i;
_mesa_init_tracked_matrices(ctx);
_mesa_init_vp_registers(ctx); /* init temp and result regs */
+ /* XXX if GL_FOG is enabled but the program doesn't write to the
+ * o[FOGC] register, set the fog result to 1.0
+ */
+ /* XXX if GL_VERTEX_PROGRAM_POINT_SIZE_NV is enabled but the program
+ * doesn't write the PSIZ variable then use ctx->Point.Size
+ */
for (i = 0; i < VB->Count; i++) {
GLuint attr;
@@ -176,8 +183,8 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage )
}
/* execute the program */
- ASSERT(ctx->VertexProgram.Current);
- _mesa_exec_program(ctx, ctx->VertexProgram.Current);
+ ASSERT(program);
+ _mesa_exec_program(ctx, program);
#if 0
printf("Output %d: %f, %f, %f, %f\n", i,
@@ -190,6 +197,8 @@ static GLboolean run_vp( GLcontext *ctx, struct gl_pipeline_stage *stage )
machine->Registers[VP_OUT_COL0][1],
machine->Registers[VP_OUT_COL0][2],
machine->Registers[VP_OUT_COL0][3]);
+ printf("PointSize[%d]: %g\n", i,
+ machine->Registers[VP_OUTPUT_REG_START + VERT_RESULT_PSIZ][0]);
#endif
/* copy the output registers into the VB->attribs arrays */