summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-03-04 18:36:13 +1000
committerDave Airlie <airlied@redhat.com>2009-03-04 18:36:13 +1000
commite0de73e8a558db5dfe8e20ed7aa2e9eae28861c1 (patch)
treeb66a5571375ff10e2560583cb8ce9e9fb09f4134 /src
parent54b42c0a4a07c5eab5c5dc4ebce2b947b7b6722e (diff)
radeon: fixup some segfaults/exit at startup
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c6
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state_init.c4
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 */