Fix: [OpenGL] Increase timeout when waiting for the GPU to be done with the drawing buffer.
The old timeout could be too short if v-sync was on on lower refresh rates.
(cherry picked from commit 97722931a9
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
26bcb7762f
commit
5be60d03a9
@@ -1150,7 +1150,7 @@ void OpenGLBackend::ClearCursorCache()
|
|||||||
void *OpenGLBackend::GetVideoBuffer()
|
void *OpenGLBackend::GetVideoBuffer()
|
||||||
{
|
{
|
||||||
#ifndef NO_GL_BUFFER_SYNC
|
#ifndef NO_GL_BUFFER_SYNC
|
||||||
if (this->sync_vid_mapping != nullptr) _glClientWaitSync(this->sync_vid_mapping, GL_SYNC_FLUSH_COMMANDS_BIT, 10000000);
|
if (this->sync_vid_mapping != nullptr) _glClientWaitSync(this->sync_vid_mapping, GL_SYNC_FLUSH_COMMANDS_BIT, 100000000); // 100ms timeout.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!this->persistent_mapping_supported) {
|
if (!this->persistent_mapping_supported) {
|
||||||
@@ -1174,7 +1174,7 @@ uint8 *OpenGLBackend::GetAnimBuffer()
|
|||||||
if (this->anim_pbo == 0) return nullptr;
|
if (this->anim_pbo == 0) return nullptr;
|
||||||
|
|
||||||
#ifndef NO_GL_BUFFER_SYNC
|
#ifndef NO_GL_BUFFER_SYNC
|
||||||
if (this->sync_anim_mapping != nullptr) _glClientWaitSync(this->sync_anim_mapping, GL_SYNC_FLUSH_COMMANDS_BIT, 10000000);
|
if (this->sync_anim_mapping != nullptr) _glClientWaitSync(this->sync_anim_mapping, GL_SYNC_FLUSH_COMMANDS_BIT, 100000000); // 100ms timeout.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!this->persistent_mapping_supported) {
|
if (!this->persistent_mapping_supported) {
|
||||||
|
Reference in New Issue
Block a user