|
|
|
@ -123,7 +123,20 @@ bool CDriverGL3::setupVertexBuffer(CVertexBuffer& VB)
|
|
|
|
|
|
|
|
|
|
// Preferred memory, reduce choices
|
|
|
|
|
CVertexBuffer::TPreferredMemory preferred = VB.getPreferredMemory();
|
|
|
|
|
|
|
|
|
|
const uint size = VB.capacity()*VB.getVertexSize();
|
|
|
|
|
|
|
|
|
|
// Vertex buffer hard
|
|
|
|
|
info->_VBHard = createVertexBufferGL(size, VB.capacity(), preferred, &VB);
|
|
|
|
|
|
|
|
|
|
// Upload the data
|
|
|
|
|
CVertexBuffer::TLocation location;
|
|
|
|
|
if (info->_VBHard->VBType == IVertexBufferGL3::AMDPinned)
|
|
|
|
|
{
|
|
|
|
|
location = CVertexBuffer::RAMResident;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
switch (preferred)
|
|
|
|
|
{
|
|
|
|
|
case CVertexBuffer::StaticPreferred:
|
|
|
|
@ -139,13 +152,7 @@ bool CDriverGL3::setupVertexBuffer(CVertexBuffer& VB)
|
|
|
|
|
default:
|
|
|
|
|
location = CVertexBuffer::AGPResident;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const uint size = VB.capacity()*VB.getVertexSize();
|
|
|
|
|
|
|
|
|
|
// Vertex buffer hard
|
|
|
|
|
info->_VBHard = createVertexBufferGL(size, VB.capacity(), preferred, &VB);
|
|
|
|
|
|
|
|
|
|
// Upload the data
|
|
|
|
|
}
|
|
|
|
|
VB.setLocation(location);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -269,7 +276,7 @@ IVertexBufferGL3 *CDriverGL3::createVertexBufferGL(uint size, uint numVertices,
|
|
|
|
|
|
|
|
|
|
if (_Extensions.AMDPinnedMemory && (
|
|
|
|
|
preferred == CVertexBuffer::RAMPreferred
|
|
|
|
|
// || preferred == CVertexBuffer::AGPPreferred
|
|
|
|
|
|| preferred == CVertexBuffer::AGPPreferred
|
|
|
|
|
))
|
|
|
|
|
{
|
|
|
|
|
result = new CVertexBufferAMDPinned(this, size, numVertices, preferred, vb);
|
|
|
|
|