r600: clean up Create/DestroyContext

This commit is contained in:
Alex Deucher 2009-08-12 14:49:07 -04:00
parent b6a4f5f1d3
commit 2f6675b816
3 changed files with 6 additions and 15 deletions

View file

@ -395,6 +395,8 @@ r600DestroyContext (__DRIcontextPrivate * driContextPriv)
if (context)
FREE(context->hw.pStateList);
radeonDestroyContext(driContextPriv);
}

View file

@ -306,16 +306,7 @@ void radeonDestroyContext(__DRIcontextPrivate *driContextPriv )
}
assert(radeon);
if (radeon)
{
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600) /* +r6/r7 */
if (IS_R600_CLASS(screen))
{
r600DestroyContext(driContextPriv);
}
#endif
if (radeon) {
if (radeon->dma.current) {
rcommonFlushCmdBuf( radeon, __FUNCTION__ );
}

View file

@ -1586,11 +1586,6 @@ static GLboolean radeonCreateContext(const __GLcontextModes * glVisual,
{
__DRIscreenPrivate *sPriv = driContextPriv->driScreenPriv;
radeonScreenPtr screen = (radeonScreenPtr) (sPriv->private);
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
if (IS_R600_CLASS(screen))
return r600CreateContext(glVisual, driContextPriv, sharedContextPriv);
#endif
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R300)
if (IS_R300_CLASS(screen))
return r300CreateContext(glVisual, driContextPriv, sharedContextPriv);
@ -1798,6 +1793,9 @@ const struct __DriverAPIRec driDriverAPI = {
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)
.CreateContext = r200CreateContext,
.DestroyContext = r200DestroyContext,
#elif RADEON_COMMON && defined(RADEON_COMMON_FOR_R600)
.CreateContext = r600CreateContext,
.DestroyContext = r600DestroyContext,
#else
.CreateContext = radeonCreateContext,
.DestroyContext = radeonDestroyContext,