summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_nvfragprog.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2005-05-04 11:44:44 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2005-05-04 11:44:44 +0000
commit47b29f511a8e917c65536fde90397d54d2ad23d3 (patch)
treec8db61607defe55b4540af3e4614df9831d2021d /src/mesa/swrast/s_nvfragprog.c
parentc3f764f7bb5a0571ddb0bc8b37aff9d663188d79 (diff)
Add a facility to route all rasterization through a fragment program
which is automatically generated to match the current texture environment state. Introduces a new value ctx->FragmentProgram._Active which is true when either _Enabled is true or there is such a fragment program ready to run. To test out on a driver running the software rasterizer, set MESA_TEX_PROG=t in the environment. It goes without saying that performance is lower for the software rasterizer in this mode.
Diffstat (limited to 'src/mesa/swrast/s_nvfragprog.c')
-rw-r--r--src/mesa/swrast/s_nvfragprog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index 2fea568cc9..51d36c0a2b 100644
--- a/src/mesa/swrast/s_nvfragprog.c
+++ b/src/mesa/swrast/s_nvfragprog.c
@@ -1410,7 +1410,7 @@ init_machine( GLcontext *ctx, struct fp_machine *machine,
void
_swrast_exec_fragment_program( GLcontext *ctx, struct sw_span *span )
{
- const struct fragment_program *program = ctx->FragmentProgram.Current;
+ const struct fragment_program *program = ctx->FragmentProgram._Current;
GLuint i;
ctx->_CurrentProgram = GL_FRAGMENT_PROGRAM_ARB; /* or NV, doesn't matter */
@@ -1418,7 +1418,7 @@ _swrast_exec_fragment_program( GLcontext *ctx, struct sw_span *span )
for (i = 0; i < span->end; i++) {
if (span->array->mask[i]) {
init_machine(ctx, &ctx->FragmentProgram.Machine,
- ctx->FragmentProgram.Current, span, i);
+ ctx->FragmentProgram._Current, span, i);
#ifdef USE_TCC
if (!_swrast_execute_codegen_program(ctx, program, ~0,