summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon/radeon_swtcl.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-06-26 21:57:23 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-06-26 21:57:23 +0000
commit3f9839a52b6152d349b5c6279cd7a3d3106b3999 (patch)
tree4099fb419452b1c811620ff4b03d891970be1855 /src/mesa/drivers/dri/radeon/radeon_swtcl.c
parenta4eb693b5fa74df9a43042fe763814a01ddeb42d (diff)
Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coords
during fallbacks. In one case, _swsetup_Wakeup had just been called, covering the need there, and in the other case, we can simply exit the entire radeonChooseVertexState function, knowing that it will be called again once we leave the fallback. Bugzilla #: 2516 Submitted by: sroland
Diffstat (limited to 'src/mesa/drivers/dri/radeon/radeon_swtcl.c')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_swtcl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 791b5e50fe..f126e4982d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -241,6 +241,13 @@ void radeonChooseVertexState( GLcontext *ctx )
GLuint se_coord_fmt;
+ /* We must ensure that we don't do _tnl_need_projected_coords while in a
+ * rasterization fallback. As this function will be called again when we
+ * leave a rasterization fallback, we can just skip it for now.
+ */
+ if (rmesa->Fallback != 0)
+ return;
+
/* HW perspective divide is a win, but tiny vertex formats are a
* bigger one.
*/
@@ -887,7 +894,6 @@ void radeonFallback( GLcontext *ctx, GLuint bit, GLboolean mode )
RADEON_FIREVERTICES( rmesa );
TCL_FALLBACK( ctx, RADEON_TCL_FALLBACK_RASTER, GL_TRUE );
_swsetup_Wakeup( ctx );
- _tnl_need_projected_coords( ctx, GL_TRUE );
rmesa->swtcl.RenderIndex = ~0;
if (RADEON_DEBUG & DEBUG_FALLBACKS) {
fprintf(stderr, "Radeon begin rasterization fallback: 0x%x %s\n",