change some bogus comments regarding the base e exponential function used for fog...
authorRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 25 Oct 2006 12:14:26 +0000 (12:14 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 25 Oct 2006 12:14:26 +0000 (12:14 +0000)
src/mesa/drivers/dri/r200/r200_vertprog.c
src/mesa/drivers/dri/r200/r200_vertprog.h

index e5417db9b7ebcc84cb852641d17d2bed3a5efe1f..588e56ec2f7a9b329c462661a1fdad573dfd9cec 100644 (file)
@@ -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);
index 38168fb2e78cbb967260fad99f63ec1f9e9b6255..938237680ce53cf52f23dbaa9853abddaad5baa7 100644 (file)
@@ -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)