static void transition_to_hwtnl( GLcontext *ctx ) { radeonContextPtr rmesa = RADEON_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint se_coord_fmt = (RADEON_VTX_W0_IS_NOT_1_OVER_W0 | RADEON_TEX1_W_ROUTING_USE_Q1); 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; _tnl_need_projected_coords( ctx, GL_FALSE ); } radeonUpdateMaterial( ctx ); tnl->Driver.NotifyMaterialChange = radeonUpdateMaterial; if ( rmesa->dma.flush ) rmesa->dma.flush( rmesa ); rmesa->dma.flush = NULL; rmesa->swtcl.vertex_format = 0; if (rmesa->swtcl.indexed_verts.buf) radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, __FUNCTION__ ); if (RADEON_DEBUG & DEBUG_FALLBACKS) fprintf(stderr, "Radeon end tcl fallback\n"); }
static void transition_to_hwtnl( struct gl_context *ctx ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx); GLuint se_coord_fmt = rmesa->hw.set.cmd[SET_SE_COORDFMT]; se_coord_fmt &= ~(RADEON_VTX_XY_PRE_MULT_1_OVER_W0 | RADEON_VTX_Z_PRE_MULT_1_OVER_W0 | RADEON_VTX_W0_IS_NOT_1_OVER_W0); se_coord_fmt |= RADEON_VTX_W0_IS_NOT_1_OVER_W0; 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; _tnl_need_projected_coords( ctx, GL_FALSE ); } radeonUpdateMaterial( ctx ); tnl->Driver.NotifyMaterialChange = radeonUpdateMaterial; if ( rmesa->radeon.dma.flush ) rmesa->radeon.dma.flush( rmesa->radeon.glCtx ); rmesa->radeon.dma.flush = NULL; rmesa->swtcl.vertex_format = 0; // if (rmesa->swtcl.indexed_verts.buf) // radeonReleaseDmaRegion( rmesa, &rmesa->swtcl.indexed_verts, // __FUNCTION__ ); if (RADEON_DEBUG & RADEON_FALLBACKS) fprintf(stderr, "Radeon end tcl fallback\n"); }
/* Materials: */ static void radeon_Materialfv( GLenum face, GLenum pname, const GLfloat *params ) { GET_CURRENT_CONTEXT(ctx); radeonContextPtr rmesa = RADEON_CONTEXT( ctx ); if (RADEON_DEBUG & DEBUG_VFMT) fprintf(stderr, "%s\n", __FUNCTION__); if (rmesa->vb.prim[0] != GL_POLYGON+1) { VFMT_FALLBACK( __FUNCTION__ ); CALL_Materialfv(GET_DISPATCH(), (face, pname, params)); return; } _mesa_noop_Materialfv( face, pname, params ); radeonUpdateMaterial( ctx ); }