mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-01-24 22:04:27 +00:00
togles: create pseudo buffer for mali gpu's
This commit is contained in:
parent
0772ca1063
commit
58873c35c7
@ -95,14 +95,11 @@ void CPersistentBuffer::Init( EGLMBufferType type,uint nSize )
|
|||||||
{
|
{
|
||||||
// Assert( gGL->m_bHave_GL_EXT_buffer_storage );
|
// Assert( gGL->m_bHave_GL_EXT_buffer_storage );
|
||||||
// Assert( gGL->m_bHave_GL_ARB_map_buffer_range );
|
// Assert( gGL->m_bHave_GL_ARB_map_buffer_range );
|
||||||
|
|
||||||
m_nSize = nSize;
|
m_nSize = nSize;
|
||||||
m_nOffset = 0;
|
m_nOffset = 0;
|
||||||
m_type = type;
|
m_type = type;
|
||||||
|
|
||||||
if( strcmp(gGL->glGetString(GL_RENDERER), "ARM") == 0 )
|
|
||||||
g_bUsePseudoBufs = true; // works faster with Mali gpu
|
|
||||||
|
|
||||||
switch ( type )
|
switch ( type )
|
||||||
{
|
{
|
||||||
case kGLMVertexBuffer: m_buffGLTarget = GL_ARRAY_BUFFER; break;
|
case kGLMVertexBuffer: m_buffGLTarget = GL_ARRAY_BUFFER; break;
|
||||||
@ -475,6 +472,12 @@ CGLMBuffer::CGLMBuffer( GLMContext *pCtx, EGLMBufferType type, uint size, uint o
|
|||||||
m_bPseudo = true;
|
m_bPseudo = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *szRenderer = gGL->glGetString(GL_VENDOR);
|
||||||
|
// Msg("GL_VENDOR: %s\n", szRenderer);
|
||||||
|
|
||||||
|
if( strcmp(szRenderer, "ARM") == 0 )
|
||||||
|
g_bUsePseudoBufs = true; // works faster with Mali gpu
|
||||||
|
|
||||||
#if GL_ENABLE_INDEX_VERIFICATION
|
#if GL_ENABLE_INDEX_VERIFICATION
|
||||||
m_BufferSpanManager.Init( m_pCtx, m_type, 512, m_nSize, m_bDynamic );
|
m_BufferSpanManager.Init( m_pCtx, m_type, 512, m_nSize, m_bDynamic );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user