diff options
author | Dave Airlie <airlied@redhat.com> | 2009-03-24 11:19:09 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-03-24 11:19:09 +1000 |
commit | 0a725db10c1491539d48370df7207206538bf945 (patch) | |
tree | 13a082aa44238e58bcc2ec61f3e47225e5f12793 /src/mesa/drivers/dri/radeon | |
parent | ccd18f462cccd238ff0d839004d43a3102f09ff3 (diff) |
radeon/r200/r300: set the texture depth correctly for DRI2
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common_context.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_context.c | 6 |
2 files changed, 6 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 f335eb0313..5b23473ab3 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -163,6 +163,12 @@ GLboolean radeonInitContext(radeonContextPtr radeon, "IRQ's not enabled, falling back to %s: %d %d\n", radeon->do_usleeps ? "usleeps" : "busy waits", fthrottle_mode, radeon->radeonScreen->irq); + + radeon->texture_depth = driQueryOptioni (&radeon->optionCache, + "texture_depth"); + if (radeon->texture_depth == DRI_CONF_TEXTURE_DEPTH_FB) + radeon->texture_depth = ( glVisual->rgbBits > 16 ) ? + DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16; return GL_TRUE; } diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c index ac945ecc4d..cad2c3e0c1 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_context.c @@ -261,12 +261,6 @@ radeonCreateContext( const __GLcontextModes *glVisual, return GL_FALSE; } - rmesa->radeon.texture_depth = driQueryOptioni (&rmesa->radeon.optionCache, - "texture_depth"); - if (rmesa->radeon.texture_depth == DRI_CONF_TEXTURE_DEPTH_FB) - rmesa->radeon.texture_depth = ( screen->cpp == 4 ) ? - DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16; - rmesa->radeon.swtcl.RenderIndex = ~0; rmesa->radeon.hw.all_dirty = GL_TRUE; |