summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2006-10-28 23:10:17 +0000
committerBrian Paul <[email protected]>2006-10-28 23:10:17 +0000
commita90ab5290c6364535ef1ba4f7c09065f177287e9 (patch)
treeeb575c323214fa0833bb2a513da394f30a9543bb /src
parent8ed319796f35ccd82863a270704752555706f1e2 (diff)
Added PROGRAM_CONSTANT to get_register_pointer().
More DEBUG_FRAG code.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/swrast/s_nvfragprog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/swrast/s_nvfragprog.c b/src/mesa/swrast/s_nvfragprog.c
index e55fe5c851a..dfca960005c 100644
--- a/src/mesa/swrast/s_nvfragprog.c
+++ b/src/mesa/swrast/s_nvfragprog.c
@@ -172,6 +172,8 @@ get_register_pointer( GLcontext *ctx,
return ctx->FragmentProgram.Parameters[source->Index];
case PROGRAM_STATE_VAR:
/* Fallthrough */
+ case PROGRAM_CONSTANT:
+ /* Fallthrough */
case PROGRAM_NAMED_PARAM:
ASSERT(source->Index < (GLint) program->Base.Parameters->NumParameters);
return program->Base.Parameters->ParameterValues[source->Index];
@@ -893,6 +895,14 @@ execute_program( GLcontext *ctx,
result[2] = a[2] * b[2] + (1.0F - a[2]) * c[2];
result[3] = a[3] * b[3] + (1.0F - a[3]) * c[3];
store_vector4( inst, machine, result );
+#if DEBUG_FRAG
+ printf("LRP (%g %g %g %g) = (%g %g %g %g), "
+ "(%g %g %g %g), (%g %g %g %g)\n",
+ result[0], result[1], result[2], result[3],
+ a[0], a[1], a[2], a[3],
+ b[0], b[1], b[2], b[3],
+ c[0], c[1], c[2], c[3]);
+#endif
}
break;
case OPCODE_MAD:
@@ -1196,6 +1206,11 @@ execute_program( GLcontext *ctx,
result[2] = a[2] - b[2];
result[3] = a[3] - b[3];
store_vector4( inst, machine, result );
+#if DEBUG_FRAG
+ printf("SUB (%g %g %g %g) = (%g %g %g %g) - (%g %g %g %g)\n",
+ result[0], result[1], result[2], result[3],
+ a[0], a[1], a[2], a[3], b[0], b[1], b[2], b[3]);
+#endif
}
break;
case OPCODE_SWZ: /* extended swizzle */