From 3f9839a52b6152d349b5c6279cd7a3d3106b3999 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Sun, 26 Jun 2005 21:57:23 +0000 Subject: 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 --- src/mesa/drivers/dri/radeon/radeon_swtcl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/radeon/radeon_swtcl.c') 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", -- cgit v1.2.3