(GCMGL) Cleanups #2

This commit is contained in:
twinaphex 2014-02-26 05:17:22 +01:00
parent 94dbb8264c
commit c6a091ef7f
3 changed files with 16 additions and 27 deletions

View File

@ -44,7 +44,6 @@ RGL_EXPORT RGLdevice* rglPlatformCreateDeviceExtended (const void *data);
RGL_EXPORT GLfloat rglPlatformGetDeviceAspectRatio (const void *data);
char *rglPlatformBufferObjectMapTextureReference(void *data, GLenum access);
GLboolean rglPlatformBufferObjectUnmapTextureReference (void *data);
GLboolean rglpCreateBufferObject (void *data);
GLboolean rglGcmFifoReferenceInUse (void *data, GLuint reference);

View File

@ -2993,17 +2993,30 @@ GLAPI GLvoid* APIENTRY glMapBufferTextureReferenceRA( GLenum target, GLenum acce
RGLcontext *LContext = _CurrentContext;
rglBufferObject* bufferObject = (rglBufferObject*)LContext->bufferObjectNameSpace.data[LContext->TextureBuffer];
bufferObject->mapped = GL_TRUE;
rglGcmFifo *fifo = (rglGcmFifo*)&rglGcmState_i.fifo;
rglGcmBufferObject *rglBuffer = (rglGcmBufferObject*)bufferObject->platformBufferObject;
CellGcmContextData *thisContext = (CellGcmContextData*)gCellGcmCurrentContext;
return rglPlatformBufferObjectMapTextureReference(bufferObject, access);
bufferObject->mapped = GL_TRUE;
rglBuffer->mapAccess = access;
// only need to pin the first time we map
gmmPinId( rglBuffer->bufferId );
return gmmIdToAddress( rglBuffer->bufferId );
}
GLAPI GLboolean APIENTRY glUnmapBufferTextureReferenceRA( GLenum target )
{
RGLcontext *LContext = _CurrentContext;
rglBufferObject* bufferObject = (rglBufferObject*)LContext->bufferObjectNameSpace.data[LContext->TextureBuffer];
rglGcmBufferObject *rglBuffer = ( rglGcmBufferObject * )bufferObject->platformBufferObject;
bufferObject->mapped = GL_FALSE;
return rglPlatformBufferObjectUnmapTextureReference( bufferObject );
rglBuffer->mapAccess = GL_NONE;
gmmUnpinId( rglBuffer->bufferId );
return GL_TRUE;
}
#ifdef __cplusplus

View File

@ -979,29 +979,6 @@ GLAPI void APIENTRY glBufferSubDataTextureReferenceRA( GLenum target, GLintptr o
}
}
char *rglPlatformBufferObjectMapTextureReference(void *data, GLenum access)
{
rglBufferObject *bufferObject = (rglBufferObject*)data;
rglGcmFifo *fifo = (rglGcmFifo*)&rglGcmState_i.fifo;
rglGcmBufferObject *rglBuffer = (rglGcmBufferObject*)bufferObject->platformBufferObject;
CellGcmContextData *thisContext = (CellGcmContextData*)gCellGcmCurrentContext;
rglBuffer->mapAccess = access;
// only need to pin the first time we map
gmmPinId( rglBuffer->bufferId );
return gmmIdToAddress( rglBuffer->bufferId );
}
GLboolean rglPlatformBufferObjectUnmapTextureReference (void *data)
{
rglBufferObject *bufferObject = (rglBufferObject*)data;
rglGcmBufferObject *rglBuffer = ( rglGcmBufferObject * )bufferObject->platformBufferObject;
rglBuffer->mapAccess = GL_NONE;
gmmUnpinId( rglBuffer->bufferId );
return GL_TRUE;
}
#ifdef __cplusplus
}
#endif