diff --git a/ps3/gcmgl/src/rgl.h b/ps3/gcmgl/src/rgl.h index 50da022de8..be529324f2 100644 --- a/ps3/gcmgl/src/rgl.h +++ b/ps3/gcmgl/src/rgl.h @@ -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); diff --git a/ps3/gcmgl/src/rgl_ps3.cpp b/ps3/gcmgl/src/rgl_ps3.cpp index fd76ec9982..d21f0149db 100644 --- a/ps3/gcmgl/src/rgl_ps3.cpp +++ b/ps3/gcmgl/src/rgl_ps3.cpp @@ -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 diff --git a/ps3/gcmgl/src/rgl_ps3_raster.cpp b/ps3/gcmgl/src/rgl_ps3_raster.cpp index e4b72f4848..4b6da35656 100644 --- a/ps3/gcmgl/src/rgl_ps3_raster.cpp +++ b/ps3/gcmgl/src/rgl_ps3_raster.cpp @@ -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