Skip to content
Permalink
Browse files

Merge pull request #555 from JMC47/pinned_memory

Place pinned memory as top priority.
  • Loading branch information...
delroth committed Jul 4, 2014
2 parents 32e45e6 + 30f93ab commit 7035e5e4fb6171526890cd61e184d5e1bbf216a0
Showing with 6 additions and 6 deletions.
  1. +6 −6 Source/Core/VideoBackends/OGL/StreamBuffer.cpp
@@ -346,16 +346,16 @@ StreamBuffer* StreamBuffer::Create(u32 type, u32 size)
// Prefer the syncing buffers over the orphaning one
if (g_ogl_config.bSupportsGLSync)
{
// try to use buffer storage whenever possible
if (g_ogl_config.bSupportsGLBufferStorage &&
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTORAGE) && type == GL_ARRAY_BUFFER))
return new BufferStorage(type, size);

// pinned memory is almost as fine
// pinned memory is much faster on amd cards
if (g_ogl_config.bSupportsGLPinnedMemory &&
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENPINNEDMEMORY) && type == GL_ELEMENT_ARRAY_BUFFER))
return new PinnedMemory(type, size);

// buffer storage works well in most situations
if (g_ogl_config.bSupportsGLBufferStorage &&
!(DriverDetails::HasBug(DriverDetails::BUG_BROKENBUFFERSTORAGE) && type == GL_ARRAY_BUFFER))
return new BufferStorage(type, size);

// don't fall back to MapAnd* for nvidia drivers
if (DriverDetails::HasBug(DriverDetails::BUG_BROKENUNSYNCMAPPING))
return new BufferSubData(type, size);

0 comments on commit 7035e5e

Please sign in to comment.
You can’t perform that action at this time.