summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_nvfragprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast/s_nvfragprog.c')
-rw-r--r--src/mesa/swrast/s_nvfragprog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index 1416e7981a1..9fef97c6f83 100644
--- a/src/mesa/swrast/s_nvfragprog.c
+++ b/src/mesa/swrast/s_nvfragprog.c
@@ -1181,6 +1181,8 @@ _swrast_exec_nv_fragment_program( GLcontext *ctx, struct sw_span *span )
const struct fragment_program *program = ctx->FragmentProgram.Current;
GLuint i;
+ ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */
+
for (i = 0; i < span->end; i++) {
if (span->array->mask[i]) {
init_machine(ctx, &ctx->FragmentProgram.Machine,
@@ -1205,5 +1207,7 @@ _swrast_exec_nv_fragment_program( GLcontext *ctx, struct sw_span *span )
span->array->z[i] = IROUND(ctx->FragmentProgram.Machine.Registers[FP_OUTPUT_REG_START + 2][0] * ctx->DepthMaxF);
}
}
+
+ ctx->_CurrentProgram = 0;
}