mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
radeon/r200/r300: set the texture depth correctly for DRI2
This commit is contained in:
parent
ccd18f462c
commit
0a725db10c
4 changed files with 6 additions and 18 deletions
|
|
@ -338,12 +338,6 @@ GLboolean r200CreateContext( 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 = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -328,12 +328,6 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
|
|||
}
|
||||
|
||||
/* Init r300 context data */
|
||||
r300->radeon.texture_depth = driQueryOptioni(&r300->radeon.optionCache,
|
||||
"texture_depth");
|
||||
if (r300->radeon.texture_depth == DRI_CONF_TEXTURE_DEPTH_FB)
|
||||
r300->radeon.texture_depth = (screen->cpp == 4) ?
|
||||
DRI_CONF_TEXTURE_DEPTH_32 : DRI_CONF_TEXTURE_DEPTH_16;
|
||||
|
||||
/* Set the maximum texture size small enough that we can guarentee that
|
||||
* all texture units can bind a maximal texture and have them both in
|
||||
* texturable memory at once.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue