mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 17:48:10 +02:00
r200: Fix swtnl fallback to flush pending rendering before transition.
Flush after transition would emit wrong state that could cause wrong state emited for pending rendering operation. Fixes wan once from extrement tuxracer that is using per vertex materials.
This commit is contained in:
parent
501156b36b
commit
2ae754b7b9
1 changed files with 14 additions and 4 deletions
|
|
@ -692,20 +692,30 @@ void r200TclFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
|
|||
GLuint oldfallback = rmesa->radeon.TclFallback;
|
||||
|
||||
if (mode) {
|
||||
rmesa->radeon.TclFallback |= bit;
|
||||
if (oldfallback == 0) {
|
||||
/* We have to flush before transition */
|
||||
if ( rmesa->radeon.dma.flush )
|
||||
rmesa->radeon.dma.flush( rmesa->radeon.glCtx );
|
||||
|
||||
if (R200_DEBUG & RADEON_FALLBACKS)
|
||||
fprintf(stderr, "R200 begin tcl fallback %s\n",
|
||||
getFallbackString( bit ));
|
||||
rmesa->radeon.TclFallback |= bit;
|
||||
transition_to_swtnl( ctx );
|
||||
}
|
||||
} else
|
||||
rmesa->radeon.TclFallback |= bit;
|
||||
} else {
|
||||
rmesa->radeon.TclFallback &= ~bit;
|
||||
if (oldfallback == bit) {
|
||||
/* We have to flush before transition */
|
||||
if ( rmesa->radeon.dma.flush )
|
||||
rmesa->radeon.dma.flush( rmesa->radeon.glCtx );
|
||||
|
||||
if (R200_DEBUG & RADEON_FALLBACKS)
|
||||
fprintf(stderr, "R200 end tcl fallback %s\n",
|
||||
getFallbackString( bit ));
|
||||
rmesa->radeon.TclFallback &= ~bit;
|
||||
transition_to_hwtnl( ctx );
|
||||
}
|
||||
} else
|
||||
rmesa->radeon.TclFallback &= ~bit;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue