r600: clean up Create/DestroyContext
This commit is contained in:
@@ -395,6 +395,8 @@ r600DestroyContext (__DRIcontextPrivate * driContextPriv)
|
||||
|
||||
if (context)
|
||||
FREE(context->hw.pStateList);
|
||||
|
||||
radeonDestroyContext(driContextPriv);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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__ );
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user