diff options
author | Karl Rasche <[email protected]> | 2003-11-19 13:17:33 +0000 |
---|---|---|
committer | Karl Rasche <[email protected]> | 2003-11-19 13:17:33 +0000 |
commit | 75b5cb43173cda966682c8c9b9353c48ab6ad285 (patch) | |
tree | 3e928c94fb3ec287d81eeea8b97ca70ba9be1ac9 /src/mesa/swrast/s_nvfragprog.c | |
parent | 1c27a1e957546ed849b3fd0c35904e9680f113f8 (diff) |
Initial checkin of new ARB_frag/vertex program parser
Diffstat (limited to 'src/mesa/swrast/s_nvfragprog.c')
-rw-r--r-- | src/mesa/swrast/s_nvfragprog.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c index 332edc5c86e..94458238b51 100644 --- a/src/mesa/swrast/s_nvfragprog.c +++ b/src/mesa/swrast/s_nvfragprog.c @@ -38,7 +38,6 @@ /* if 1, print some debugging info */ #define DEBUG_FRAG 0 - /** * Fetch a texel. */ @@ -120,13 +119,14 @@ get_register_pointer( GLcontext *ctx, ASSERT(source->Index < MAX_NV_FRAGMENT_PROGRAM_PARAMS); src = ctx->FragmentProgram.Parameters[source->Index]; break; + + case PROGRAM_STATE_VAR: + /* Fallthrough */ + case PROGRAM_NAMED_PARAM: ASSERT(source->Index < (GLint) program->Parameters->NumParameters); src = program->Parameters->Parameters[source->Index].Values; break; - case PROGRAM_STATE_VAR: - src = NULL; - break; default: _mesa_problem(ctx, "Invalid input register file in fetch_vector4"); src = NULL; @@ -572,6 +572,12 @@ execute_program( GLcontext *ctx, printf("execute fragment program --------------------\n"); #endif + /* XXX: This should go someplace else, but it is safe here (and slow!) + * - karl + */ + _mesa_load_state_parameters(ctx, program->Parameters); + + for (pc = 0; pc < maxInst; pc++) { const struct fp_instruction *inst = program->Instructions + pc; |