Am 2003.03.30 17:45:23 +0200 schrieb(en) Brian Paul:
Andreas Stenglein wrote:
So in VTXFMT Mode, RADEON_CP_VC_FRMT_FPALPHA isnt added to "ind",
and so some programs dont look as good as they do when
NO_VTXFMT=1 is set.

ctx->Color.AlphaEnabled refers to GL_ALPHA_TEST. It has nothing to do whatsoever with materials and lighting.

I think the real bug is elsewhere.

strange... maybe RADEON_CP_VC_FRMT_FPALPHA isnt for alpha-testing, but just for alpha-blending? When you look in radeon_maos_arrays.c (which seems to be not used at all right now) ..._FPALPHA is enabled in this case: -snip- if (VB->ColorPtr[0]->Size == 4 && (VB->ColorPtr[0]->StrideB != 0 || ((GLfloat *)VB->ColorPtr[0]->Ptr)[3] != 1.0)) { vfmt |= RADEON_CP_VC_FRMT_FPCOLOR | RADEON_CP_VC_FRMT_FPALPHA; emitsize = 4; } else { vfmt |= RADEON_CP_VC_FRMT_FPCOLOR; emitsize = 3; } -snip- it just doesnt query ctx->Color.AlphaEnabled as the vtxfmt-path does.

Or: when you look into radeon_vtxfmt_c.c,
the _FPALPHA-flag is queried to choose between
radeon_Color4f_3f or radeon_Color4f_4f funtions:
-snip-
#define CHOOSE_COLOR(FN, FNTYPE, NR, MASK, ACTIVE, ARGS1, ARGS2 ) \
static void choose_##FN ARGS1                                     \
{                                                                 \
     GLcontext *ctx = vb.context;                                   \
     radeonContextPtr rmesa = RADEON_CONTEXT(vb.context);           \
     int key = rmesa->vb.vertex_format & (MASK|ACTIVE);             \
     struct dynfn *dfn;                                             \
                                                                    \
     if (rmesa->vb.vertex_format & ACTIVE_PKCOLOR) {                \
        ctx->Exec->FN = radeon_##FN##_ub;                           \
     }                                                              \
     else if ((rmesa->vb.vertex_format &                            \
              (ACTIVE_FPCOLOR|ACTIVE_FPALPHA)) == ACTIVE_FPCOLOR) { \
                                                                    \
        if (rmesa->vb.installed_color_3f_sz != NR) {                \
           rmesa->vb.installed_color_3f_sz = NR;                    \
           if (NR == 3) ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3] =
1.0; \
           if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) {      \
              radeon_copy_to_current( ctx );                        \
              _mesa_install_exec_vtxfmt( ctx, &rmesa->vb.vtxfmt );  \
              ctx->Exec->FN ARGS2;                                  \
              return;                                               \
           }                                                        \
        }                                                           \
                                                                    \
        ctx->Exec->FN = radeon_##FN##_3f;                           \
     }                                                              \
     else {                                                         \
        ctx->Exec->FN = radeon_##FN##_4f;                           \
     }
-snip-
#define ACTIVE_FPALPHA RADEON_CP_VC_FRMT_FPALPHA
-snip-
CHOOSE_COLOR(Color4f, p4f, 4, MASK_COLOR, ACTIVE_COLOR,
           (GLfloat a,GLfloat b, GLfloat c, GLfloat d), (a,b,c,d))
-snip-
is there a description what this flag really does?

best
regards,
Andreas





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to