mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Don't use persistently mapped buffers on Intel Ivy Bridge GPUs on Windows. glClientWaitSync can hang with those drivers, apparently.
This commit is contained in:
@@ -538,14 +538,17 @@ love::graphics::StreamBuffer *CreateStreamBuffer(BufferType mode, size_t size)
|
||||
{
|
||||
if (gl.isCoreProfile())
|
||||
{
|
||||
// AMD's pinned memory seems to be faster than persistent mapping, on
|
||||
// AMD GPUs.
|
||||
if (GLAD_AMD_pinned_memory)
|
||||
return new StreamBufferPinnedMemory(mode, size);
|
||||
else if (GLAD_VERSION_4_4 || GLAD_ARB_buffer_storage)
|
||||
return new StreamBufferPersistentMapSync(mode, size);
|
||||
else
|
||||
return new StreamBufferSubDataOrphan(mode, size);
|
||||
if (!gl.bugs.clientWaitSyncStalls)
|
||||
{
|
||||
// AMD's pinned memory seems to be faster than persistent mapping,
|
||||
// on AMD GPUs.
|
||||
if (GLAD_AMD_pinned_memory)
|
||||
return new StreamBufferPinnedMemory(mode, size);
|
||||
else if (GLAD_VERSION_4_4 || GLAD_ARB_buffer_storage)
|
||||
return new StreamBufferPersistentMapSync(mode, size);
|
||||
}
|
||||
|
||||
return new StreamBufferSubDataOrphan(mode, size);
|
||||
}
|
||||
else
|
||||
return new StreamBufferClientMemory(mode, size);
|
||||
|
||||
Reference in New Issue
Block a user