mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 14:10:09 +01:00
r600: clean up Create/DestroyContext
This commit is contained in:
parent
b6a4f5f1d3
commit
2f6675b816
3 changed files with 6 additions and 15 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue