From e0de73e8a558db5dfe8e20ed7aa2e9eae28861c1 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 4 Mar 2009 18:36:13 +1000 Subject: radeon: fixup some segfaults/exit at startup --- src/mesa/drivers/dri/radeon/radeon_common_context.c | 6 +++--- src/mesa/drivers/dri/radeon/radeon_state_init.c | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 4da2055c13..7358391097 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -545,6 +545,9 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, if (RADEON_DEBUG & DEBUG_DRI) fprintf(stderr, "%s ctx %p dfb %p rfb %p\n", __FUNCTION__, radeon->glCtx, drfb, readfb); + if (radeon->dri.readable != driReadPriv) + radeon->dri.readable = driReadPriv; + driUpdateFramebufferSize(radeon->glCtx, driDrawPriv); if (driReadPriv != driDrawPriv) driUpdateFramebufferSize(radeon->glCtx, driReadPriv); @@ -555,9 +558,6 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv, if (radeon->glCtx->DrawBuffer == &drfb->base) { - if (radeon->dri.readable != driReadPriv) - radeon->dri.readable = driReadPriv; - if (radeon->dri.drawable != driDrawPriv) { if (driDrawPriv->swap_interval == (unsigned)-1) { int i; diff --git a/src/mesa/drivers/dri/radeon/radeon_state_init.c b/src/mesa/drivers/dri/radeon/radeon_state_init.c index 7ff0eb450c..26a9c316ce 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state_init.c +++ b/src/mesa/drivers/dri/radeon/radeon_state_init.c @@ -549,9 +549,7 @@ void radeonInitState( r100ContextPtr rmesa ) rmesa->radeon.state.stencil.clear = 0xffff0000; break; default: - fprintf( stderr, "Error: Unsupported depth %d... exiting\n", - ctx->Visual.depthBits ); - exit( -1 ); + break; } /* Only have hw stencil when depth buffer is 24 bits deep */ -- cgit v1.2.3