mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
(GCM GL) Cleanups
This commit is contained in:
parent
72ca37f9d6
commit
1a994ef1c3
@ -516,13 +516,12 @@ static GmmBlock *gmmAllocBlock(
|
||||
{
|
||||
pNewBlock->pPrev = pBlock;
|
||||
pBlock->pNext = pNewBlock;
|
||||
pAllocator->pTail = pNewBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
pAllocator->pHead = pNewBlock;
|
||||
pAllocator->pTail = pNewBlock;
|
||||
}
|
||||
pAllocator->pTail = pNewBlock;
|
||||
}
|
||||
|
||||
return pNewBlock;
|
||||
@ -610,15 +609,10 @@ static GmmTileBlock *gmmCreateTileBlock(
|
||||
pNewBlock->pNext = pAllocator->pTileHead;
|
||||
|
||||
if (pAllocator->pTileHead)
|
||||
{
|
||||
pAllocator->pTileHead->pPrev = pNewBlock;
|
||||
pAllocator->pTileHead = pNewBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
pAllocator->pTileHead = pNewBlock;
|
||||
pAllocator->pTileTail = pNewBlock;
|
||||
}
|
||||
pAllocator->pTileHead = pNewBlock;
|
||||
|
||||
return pNewBlock;
|
||||
}
|
||||
@ -804,20 +798,19 @@ static void gmmAddPendingFree (void *data)
|
||||
|
||||
pAllocator = pGmmLocalAllocator;
|
||||
|
||||
pBlock->pNextFree = NULL;
|
||||
|
||||
if (pAllocator->pPendingFreeTail)
|
||||
{
|
||||
pBlock->pNextFree = NULL;
|
||||
pBlock->pPrevFree = pAllocator->pPendingFreeTail;
|
||||
pAllocator->pPendingFreeTail->pNextFree = pBlock;
|
||||
pAllocator->pPendingFreeTail = pBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
pBlock->pNextFree = NULL;
|
||||
pBlock->pPrevFree = NULL;
|
||||
pAllocator->pPendingFreeHead = pBlock;
|
||||
pAllocator->pPendingFreeTail = pBlock;
|
||||
}
|
||||
pAllocator->pPendingFreeTail = pBlock;
|
||||
|
||||
pBlock->isPinned = 0;
|
||||
|
||||
@ -4211,11 +4204,10 @@ GLAPI void APIENTRY glActiveTexture( GLenum texture )
|
||||
|
||||
int unit = texture - GL_TEXTURE0;
|
||||
LContext->ActiveTexture = unit;
|
||||
LContext->CurrentImageUnit = NULL;
|
||||
|
||||
if(unit < RGL_MAX_TEXTURE_IMAGE_UNITS)
|
||||
LContext->CurrentImageUnit = LContext->TextureImageUnits + unit;
|
||||
else
|
||||
LContext->CurrentImageUnit = NULL;
|
||||
}
|
||||
|
||||
/*============================================================
|
||||
|
@ -419,27 +419,25 @@ void rglCreatePushBuffer(void *data)
|
||||
|
||||
//TODO: this is tmp
|
||||
program->samplerCount = samplerCount;
|
||||
program->samplerValuesLocation = NULL;
|
||||
program->samplerIndices = NULL;
|
||||
program->samplerUnits = NULL;
|
||||
|
||||
if ( samplerCount )
|
||||
{
|
||||
program->samplerValuesLocation = ( GLuint* )malloc( samplerCount * sizeof( GLuint ) );
|
||||
program->samplerIndices = ( GLuint* )malloc( samplerCount * sizeof( GLuint ) );
|
||||
program->samplerUnits = ( GLuint* )malloc( samplerCount * sizeof( GLuint ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
program->samplerValuesLocation = NULL;
|
||||
program->samplerIndices = NULL;
|
||||
program->samplerUnits = NULL;
|
||||
}
|
||||
|
||||
GLuint *samplerValuesLocation = program->samplerValuesLocation;
|
||||
GLuint *samplerIndices = program->samplerIndices;
|
||||
GLuint *samplerUnits = program->samplerUnits;
|
||||
|
||||
program->constantPushBufferPointers = NULL;
|
||||
|
||||
if ( programPushBufferPointersSize )
|
||||
program->constantPushBufferPointers = ( unsigned int** )malloc( programPushBufferPointersSize * 4 );
|
||||
else
|
||||
program->constantPushBufferPointers = NULL;
|
||||
|
||||
uint32_t *rglGcmCurrent = (uint32_t*)program->memoryBlock;
|
||||
program->constantPushBuffer = ( bufferSize > 0 ) ? ( unsigned int * )rglGcmCurrent : NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user