mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01:00
Merge pull request #6403 from degasus/master
OGL: Use glBufferData on Mali.
This commit is contained in:
commit
25a516bae3
@ -376,7 +376,12 @@ std::unique_ptr<StreamBuffer> StreamBuffer::Create(u32 type, u32 size)
|
|||||||
|
|
||||||
// don't fall back to MapAnd* for Nvidia drivers
|
// don't fall back to MapAnd* for Nvidia drivers
|
||||||
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_UNSYNC_MAPPING))
|
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_UNSYNC_MAPPING))
|
||||||
return std::make_unique<BufferSubData>(type, size);
|
{
|
||||||
|
if (DriverDetails::HasBug(DriverDetails::BUG_BROKEN_BUFFER_STREAM))
|
||||||
|
return std::make_unique<BufferData>(type, size);
|
||||||
|
else
|
||||||
|
return std::make_unique<BufferSubData>(type, size);
|
||||||
|
}
|
||||||
|
|
||||||
// mapping fallback
|
// mapping fallback
|
||||||
if (g_ogl_config.bSupportsGLSync)
|
if (g_ogl_config.bSupportsGLSync)
|
||||||
|
@ -82,6 +82,8 @@ static BugInfo m_known_bugs[] = {
|
|||||||
BUG_BROKEN_UNSYNC_MAPPING, -1.0, -1.0, true},
|
BUG_BROKEN_UNSYNC_MAPPING, -1.0, -1.0, true},
|
||||||
{API_OPENGL, OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN, BUG_BROKEN_UNSYNC_MAPPING,
|
{API_OPENGL, OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, Family::UNKNOWN, BUG_BROKEN_UNSYNC_MAPPING,
|
||||||
-1.0, -1.0, true},
|
-1.0, -1.0, true},
|
||||||
|
{API_OPENGL, OS_ALL, VENDOR_ARM, DRIVER_ARM, Family::UNKNOWN, BUG_BROKEN_UNSYNC_MAPPING, -1.0,
|
||||||
|
-1.0, true},
|
||||||
{API_OPENGL, OS_WINDOWS, VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN,
|
{API_OPENGL, OS_WINDOWS, VENDOR_INTEL, DRIVER_INTEL, Family::UNKNOWN,
|
||||||
BUG_INTEL_BROKEN_BUFFER_STORAGE, 101810.3907, 101810.3960, true},
|
BUG_INTEL_BROKEN_BUFFER_STORAGE, 101810.3907, 101810.3960, true},
|
||||||
{API_OPENGL, OS_ALL, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN, BUG_SLOW_GETBUFFERSUBDATA, -1.0,
|
{API_OPENGL, OS_ALL, VENDOR_ATI, DRIVER_ATI, Family::UNKNOWN, BUG_SLOW_GETBUFFERSUBDATA, -1.0,
|
||||||
|
@ -125,13 +125,17 @@ enum Bug
|
|||||||
// Intel HD 4000 series isn't affected by the bug
|
// Intel HD 4000 series isn't affected by the bug
|
||||||
BUG_PRIMITIVE_RESTART,
|
BUG_PRIMITIVE_RESTART,
|
||||||
// Bug: unsync mapping doesn't work fine
|
// Bug: unsync mapping doesn't work fine
|
||||||
// Affected devices: Nvidia driver
|
// Affected devices: Nvidia driver, ARM Mali
|
||||||
// Started Version: -1
|
// Started Version: -1
|
||||||
// Ended Version: -1
|
// Ended Version: -1
|
||||||
// The Nvidia driver (both Windows + Linux) doesn't like unsync mapping performance wise.
|
// The Nvidia driver (both Windows + Linux) doesn't like unsync mapping performance wise.
|
||||||
// Because of their threaded behavior, they seem not to handle unsync mapping complete unsync,
|
// Because of their threaded behavior, they seem not to handle unsync mapping complete unsync,
|
||||||
// in fact, they serialize the driver which adds a much bigger overhead.
|
// in fact, they serialize the driver which adds a much bigger overhead.
|
||||||
// Workaround: Use BufferSubData
|
// Workaround: Use BufferSubData
|
||||||
|
// The Mali behavior is even worse: They just ignore the unsychronized flag and stall the GPU.
|
||||||
|
// Workaround: As they were even too lazy to implement asynchronous buffer updates,
|
||||||
|
// BufferSubData stalls as well, so we have to use the slowest possible path:
|
||||||
|
// Alloc one buffer per draw call with BufferData.
|
||||||
// TODO: some Windows AMD driver/GPU combination seems also affected
|
// TODO: some Windows AMD driver/GPU combination seems also affected
|
||||||
// but as they all support pinned memory, it doesn't matter
|
// but as they all support pinned memory, it doesn't matter
|
||||||
BUG_BROKEN_UNSYNC_MAPPING,
|
BUG_BROKEN_UNSYNC_MAPPING,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user