mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-04 22:46:46 +00:00
(PS3 RGL) Optimization - don't invalidate vertex cache when doing
glMapBufferTextureReferenceRA/glUnmapBufferTextureReferenceRA
This commit is contained in:
parent
1ce7bed027
commit
ee89f3b711
@ -3146,7 +3146,7 @@ GLAPI GLvoid* APIENTRY glMapBufferTextureReferenceRA( GLenum target, GLenum acce
|
||||
rglBufferObject* bufferObject = (rglBufferObject*)LContext->bufferObjectNameSpace.data[LContext->TextureBuffer];
|
||||
bufferObject->mapped = GL_TRUE;
|
||||
|
||||
return rglPlatformBufferObjectMap(bufferObject, access);
|
||||
return rglPlatformBufferObjectMapTextureReference(bufferObject, access);
|
||||
}
|
||||
|
||||
GLAPI GLboolean APIENTRY glUnmapBufferTextureReferenceRA( GLenum target )
|
||||
@ -3154,7 +3154,7 @@ GLAPI GLboolean APIENTRY glUnmapBufferTextureReferenceRA( GLenum target )
|
||||
RGLcontext *LContext = _CurrentContext;
|
||||
rglBufferObject* bufferObject = (rglBufferObject*)LContext->bufferObjectNameSpace.data[LContext->TextureBuffer];
|
||||
bufferObject->mapped = GL_FALSE;
|
||||
return rglPlatformBufferObjectUnmap( bufferObject );
|
||||
return rglPlatformBufferObjectUnmapTextureReference( bufferObject );
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -1223,6 +1223,7 @@ GLAPI void APIENTRY glBufferSubData( GLenum target, GLintptr offset, GLsizeiptr
|
||||
rglPlatformBufferObjectSetData( bufferObject, offset, size, data, GL_FALSE );
|
||||
}
|
||||
|
||||
|
||||
char *rglPlatformBufferObjectMap (void *data, GLenum access)
|
||||
{
|
||||
rglBufferObject *bufferObject = (rglBufferObject*)data;
|
||||
@ -1299,6 +1300,37 @@ GLboolean rglPlatformBufferObjectUnmap (void *data)
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
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
|
||||
|
||||
/*============================================================
|
||||
PLATFORM FRAMEBUFFER
|
||||
============================================================ */
|
||||
|
@ -45,4 +45,15 @@ RGL_EXPORT RGLdevice* rglPlatformCreateDeviceAuto( GLenum colorFormat, GLenum de
|
||||
RGL_EXPORT RGLdevice* rglPlatformCreateDeviceExtended (const void *data);
|
||||
RGL_EXPORT GLfloat rglPlatformGetDeviceAspectRatio (const void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
char *rglPlatformBufferObjectMapTextureReference(void *data, GLenum access);
|
||||
GLboolean rglPlatformBufferObjectUnmapTextureReference (void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user