GL3: Set slowUnlockVertexBufferHard to false

--HG--
branch : opengl3
hg/feature/opengl3
kaetemi 11 years ago
parent f3766f9c40
commit 984b899287

@ -240,7 +240,6 @@ CDriverGL3::CDriverGL3()
_CurrentVertexBufferGL= NULL;
/*_NVCurrentVARPtr= NULL;
_NVCurrentVARSize= 0;*/
_SlowUnlockVBHard= true;
_AllocatedTextureMemory= 0;

@ -1131,7 +1131,6 @@ private:
// The VertexBufferHardGL activated.
IVertexBufferGL *_CurrentVertexBufferGL;
bool _SlowUnlockVBHard;
GLenum vertexBufferUsageGL3(CVertexBuffer::TPreferredMemory usage);
// Handle lost buffers

@ -230,7 +230,7 @@ bool CDriverGL3::supportVolatileVertexBuffer() const
bool CDriverGL3::slowUnlockVertexBufferHard() const
{
H_AUTO_OGL(CDriverGL3_slowUnlockVertexBufferHard)
return _SlowUnlockVBHard;
return false;
}
@ -500,8 +500,6 @@ bool CDriverGL3::initVertexBufferHard(uint agpMem, uint vramMem)
{
H_AUTO_OGL(CDriverGL3_initVertexBufferHard)
_SlowUnlockVBHard = true;
return true;
}

@ -131,7 +131,6 @@ void *CVertexBufferGL::lock()
}
m_Driver->_DriverGLStates.bindARBVertexBuffer(VertexObjectId);
// m_VertexPtr = nglMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
// PERFORMANCE: AMD: This brings framerate from 24fps to 38fps, glitches with volatile buffers such as animated models and gui, likely glitches with others
@ -146,10 +145,13 @@ void *CVertexBufferGL::lock()
{
case CVertexBuffer::AGPVolatile:
case CVertexBuffer::RAMVolatile:
// NOTE: GL_MAP_INVALIDATE_BUFFER_BIT removes the cost of waiting for synchronization (major performance impact),
// but adds the cost of allocating a new buffer (which hast a much lower performance impact)
m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
break;
case CVertexBuffer::RAMPreferred:
// m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_READ_BIT);
// m_VertexPtr = nglMapBufferRange(GL_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_READ_BIT | GL_MAP_PERSISTENT | GL_MAP_COHERENT);
// NOTE: Persistent / Coherent is only available in OpenGL 4.4 (2013/2014 hardware with recent drivers)
m_VertexPtr = nglMapBuffer(GL_ARRAY_BUFFER, GL_READ_WRITE);
break;
default:

Loading…
Cancel
Save