summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2006-10-25 12:14:26 +0000
committerRoland Scheidegger <[email protected]>2006-10-25 12:14:26 +0000
commite9b923182ed8738fe5eb8bea1d688a6198db346e (patch)
tree6c8302b52351af3f86eff12bf72b65885d8eef6d /src/mesa/drivers/dri
parentfc606f7db9072d4f40081aea8f92f1d4489a5115 (diff)
change some bogus comments regarding the base e exponential function used for fog in vertex programs.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.c8
-rw-r--r--src/mesa/drivers/dri/r200/r200_vertprog.h5
2 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.c b/src/mesa/drivers/dri/r200/r200_vertprog.c
index e5417db9b7e..588e56ec2f7 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.c
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.c
@@ -543,8 +543,8 @@ static GLboolean r200_translate_vertex_program(struct r200_vertex_program *vp, G
//_mesa_print_program(&mesa_vp->Base);
}
- /* for fogc, can't change mesa_vp, as it would hose swtnl
- maybe should just copy whole prog ? */
+ /* for fogc, can't change mesa_vp, as it would hose swtnl, and exp with
+ base e isn't directly available neither. */
if (mesa_vp->Base.OutputsWritten & VERT_RESULT_FOGC && !vp->fogpidx) {
struct gl_program_parameter_list *paramList;
GLint tokens[6] = { STATE_FOG_PARAMS, 0, 0, 0, 0, 0 };
@@ -1016,7 +1016,7 @@ else {
o_inst->src1 = EASY_VSF_SOURCE(vp->fogpidx, X, X, X, X, PARAM, NONE);
o_inst->src2 = UNUSED_SRC_1;
o_inst++;
- o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_EXP_FOG,
+ o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_EXP_E,
R200_VSF_OUT_CLASS_RESULT_FOGC,
VSF_FLAG_X);
o_inst->src0 = EASY_VSF_SOURCE(fog_temp_i, X, X, X, X, TMP, ALL);
@@ -1038,7 +1038,7 @@ else {
o_inst->src1 = EASY_VSF_SOURCE(fog_temp_i, X, X, X, X, TMP, NONE);
o_inst->src2 = UNUSED_SRC_1;
o_inst++;
- o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_EXP_FOG,
+ o_inst->op = MAKE_VSF_OP(R200_VPI_OUT_OP_EXP_E,
R200_VSF_OUT_CLASS_RESULT_FOGC,
VSF_FLAG_X);
o_inst->src0 = EASY_VSF_SOURCE(fog_temp_i, X, X, X, X, TMP, ALL);
diff --git a/src/mesa/drivers/dri/r200/r200_vertprog.h b/src/mesa/drivers/dri/r200/r200_vertprog.h
index 38168fb2e78..938237680ce 100644
--- a/src/mesa/drivers/dri/r200/r200_vertprog.h
+++ b/src/mesa/drivers/dri/r200/r200_vertprog.h
@@ -89,9 +89,8 @@ extern void r200SetupVertexProg( GLcontext *ctx );
#define R200_VPI_OUT_OP_EXP (65 << 0)
#define R200_VPI_OUT_OP_LOG (66 << 0)
-/* this is used for fog. Not sure what's different to normal EX2,
- but for fog calcs seems to match sw tnl much more closely. */
-#define R200_VPI_OUT_OP_EXP_FOG (67 << 0)
+/* base e exp. Useful for fog. */
+#define R200_VPI_OUT_OP_EXP_E (67 << 0)
#define R200_VPI_OUT_OP_LIT (68 << 0)
#define R200_VPI_OUT_OP_POW (69 << 0)