Am 2004.10.13 03:51:44 +0200 schrieb(en) Eric Anholt:
[...]
> New patch at:
> http://pdx.freedesktop.org/~anholt/dri/r200-projtex-8.diff
[...]

It seems Radeon R100 and R200 can't do projective texturing when
using tiny vertices (without w).


While fiddling around with R100 and tvertex-patch i noticed:

1) R100 with current mesa-cvs HEAD (without t_vertex-patch)
does projective texturing right (projtex test)
There are no "additional corners" visible.

2) R100 with t_vertex patch shows "additional corners" like on R200.

3) I modified the t_vertex patch for radeon to never use
tiny vertices and then it worked there, too.
Unfortunately some surfaces are drawn black. (clipping issue?)

Or is there some other bit in a register that should get set/cleared to make
projtex work with tiny vertices?

greetings,
Andreas


void radeonChooseVertexState( GLcontext *ctx )
{
   radeonContextPtr rmesa = RADEON_CONTEXT( ctx );
   TNLcontext *tnl = TNL_CONTEXT(ctx);

   GLuint se_coord_fmt;

   /* HW perspective divide is a win, but tiny vertex formats are a
    * bigger one.
    */

/* FIXME: radeon seems to do projective texturing wrong when using tiny vertices */
/* just disable it for all texturing... */

   if ( ((tnl->render_inputs & _TNL_BITS_TEX_ANY) == 0)
/*
        || (ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE|DD_TRI_UNFILLED))   */   ) {
      rmesa->swtcl.needproj = GL_TRUE;
      se_coord_fmt = (RADEON_VTX_XY_PRE_MULT_1_OVER_W0 |
                      RADEON_VTX_Z_PRE_MULT_1_OVER_W0 |
                      RADEON_TEX1_W_ROUTING_USE_Q1);
   }
   else {
      rmesa->swtcl.needproj = GL_FALSE;
      se_coord_fmt = (RADEON_VTX_W0_IS_NOT_1_OVER_W0 |
                      RADEON_TEX1_W_ROUTING_USE_Q1);
   }

   _tnl_need_projected_coords( ctx, rmesa->swtcl.needproj );

   if ( se_coord_fmt != rmesa->hw.set.cmd[SET_SE_COORDFMT] ) {
      RADEON_STATECHANGE( rmesa, set );
      rmesa->hw.set.cmd[SET_SE_COORDFMT] = se_coord_fmt;
   }
}


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to