summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2018-05-24 00:00:02 +0200
committerdegasus <wickmarkus@web.de>2018-05-24 00:00:02 +0200
commitfdfd8b19d62dbd254046aaabdc4c7a9ee167467a (patch)
treebb3497840a88f1558fe33d63ece53b20114f1a52 /Source/Core/VideoBackends
parentdfb1dbad47efeec60490f910254d53fe70b54477 (diff)
OGL/Streambuffer: Use coherent mapping by default.
Coherent mappings have a lower overhead and less GL codes. So enables coherent mapping by default for all drivers. Both Qualcomm and ARM performs very bad with explicit flushing, so this change helps them as well. AFAIK there was one GPU generation which was slower on coherent mapping: nvidia tesla So Geforce 200 and 300 series should be tested with this PR before merging. As this was last tested many years ago, this issue might have been fixed as well. Those GPUs are close to 10 years old and not supported any more by nvidia.
Diffstat (limited to 'Source/Core/VideoBackends')
-rw-r--r--Source/Core/VideoBackends/OGL/StreamBuffer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp
index e32afd9a47..d50bc38ed3 100644
--- a/Source/Core/VideoBackends/OGL/StreamBuffer.cpp
+++ b/Source/Core/VideoBackends/OGL/StreamBuffer.cpp
@@ -216,7 +216,7 @@ public:
class BufferStorage : public StreamBuffer
{
public:
- BufferStorage(u32 type, u32 size, bool _coherent = false)
+ BufferStorage(u32 type, u32 size, bool _coherent = true)
: StreamBuffer(type, size), coherent(_coherent)
{
CreateFences();
@@ -368,13 +368,12 @@ std::unique_ptr<StreamBuffer> StreamBuffer::Create(u32 type, u32 size)
return std::make_unique<PinnedMemory>(type, size);
// buffer storage works well in most situations
- bool coherent = DriverDetails::HasBug(DriverDetails::BUG_BROKEN_EXPLICIT_FLUSH);
if (g_ogl_config.bSupportsGLBufferStorage &&
!(DriverDetails::HasBug(DriverDetails::BUG_BROKEN_BUFFER_STORAGE) &&
type == GL_ARRAY_BUFFER) &&
!(DriverDetails::HasBug(DriverDetails::BUG_INTEL_BROKEN_BUFFER_STORAGE) &&
type == GL_ELEMENT_ARRAY_BUFFER))
- return std::make_unique<BufferStorage>(type, size, coherent);
+ return std::make_unique<BufferStorage>(type, size);
// don't fall back to MapAnd* for Nvidia drivers
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_UNSYNC_MAPPING))