summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2006-11-02 12:02:13 +0000
committerAlan Hourihane <[email protected]>2006-11-02 12:02:13 +0000
commit6d104cb932080c5c0d951fbc0ec6d30fb7ebef45 (patch)
tree17207f566d6eda4d3884ec03dfff6cdb5a1965ea /src/mesa/tnl
parent18d52f96bb1f20b1887b67e87506835bca05d73a (diff)
merge current trunk into vbo branch
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_context.c5
-rw-r--r--src/mesa/tnl/t_vb_program.c14
2 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c
index 5d6b6dd97da..bd459a77479 100644
--- a/src/mesa/tnl/t_context.c
+++ b/src/mesa/tnl/t_context.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -135,7 +135,8 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state )
if (ctx->Fog.Enabled ||
(ctx->FragmentProgram._Active &&
- ctx->FragmentProgram._Current->FogOption != GL_NONE))
+ (ctx->FragmentProgram._Current->FogOption != GL_NONE ||
+ ctx->FragmentProgram._Current->Base.InputsRead & FRAG_BIT_FOGC)))
RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_FOG );
if (ctx->Polygon.FrontMode != GL_FILL ||
diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c
index b8828ec36ac..f11ac616f16 100644
--- a/src/mesa/tnl/t_vb_program.c
+++ b/src/mesa/tnl/t_vb_program.c
@@ -76,6 +76,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
struct vp_stage_data *store = VP_STAGE_DATA(stage);
struct vertex_buffer *VB = &tnl->vb;
struct gl_vertex_program *program = ctx->VertexProgram.Current;
+ struct vp_machine machine;
GLuint i;
if (ctx->ShaderObjects._VertexShaderPresent)
@@ -91,7 +92,7 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
for (i = 0; i < VB->Count; i++) {
GLuint attr;
- _mesa_init_vp_per_vertex_registers(ctx);
+ _mesa_init_vp_per_vertex_registers(ctx, &machine);
#if 0
printf("Input %d: %f, %f, %f, %f\n", i,
@@ -118,30 +119,29 @@ run_vp( GLcontext *ctx, struct tnl_pipeline_stage *stage )
const GLuint size = VB->AttribPtr[attr]->size;
const GLuint stride = VB->AttribPtr[attr]->stride;
const GLfloat *data = (GLfloat *) (ptr + stride * i);
- COPY_CLEAN_4V(ctx->VertexProgram.Machine.Inputs[attr], size, data);
+ COPY_CLEAN_4V(machine.Inputs[attr], size, data);
}
}
/* execute the program */
ASSERT(program);
- _mesa_exec_vertex_program(ctx, program);
+ _mesa_exec_vertex_program(ctx, &machine, program);
/* Fixup fog an point size results if needed */
if (ctx->Fog.Enabled &&
(program->Base.OutputsWritten & (1 << VERT_RESULT_FOGC)) == 0) {
- ctx->VertexProgram.Machine.Outputs[VERT_RESULT_FOGC][0] = 1.0;
+ machine.Outputs[VERT_RESULT_FOGC][0] = 1.0;
}
if (ctx->VertexProgram.PointSizeEnabled &&
(program->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) == 0) {
- ctx->VertexProgram.Machine.Outputs[VERT_RESULT_PSIZ][0] = ctx->Point.Size;
+ machine.Outputs[VERT_RESULT_PSIZ][0] = ctx->Point.Size;
}
/* copy the output registers into the VB->attribs arrays */
/* XXX (optimize) could use a conditional and smaller loop limit here */
for (attr = 0; attr < 15; attr++) {
- COPY_4V(store->attribs[attr].data[i],
- ctx->VertexProgram.Machine.Outputs[attr]);
+ COPY_4V(store->attribs[attr].data[i], machine.Outputs[attr]);
}
}