mirror of https://github.com/OpenTTD/OpenTTD
Change: Do not disallow persistent buffer mapping on AMD GPUs, as it is actually faster.
parent
bcaa367b68
commit
7a886cb4d4
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
/* Define to disable buffer syncing. Will increase max fast forward FPS but produces artifacts. Mainly useful for performance testing. */
|
/* Define to disable buffer syncing. Will increase max fast forward FPS but produces artifacts. Mainly useful for performance testing. */
|
||||||
// #define NO_GL_BUFFER_SYNC
|
// #define NO_GL_BUFFER_SYNC
|
||||||
/* Define to enable persistent buffer mapping on AMD GPUs. */
|
|
||||||
// #define GL_MAP_PERSISTENT_AMD
|
|
||||||
/* Define to allow software rendering backends. */
|
/* Define to allow software rendering backends. */
|
||||||
// #define GL_ALLOW_SOFTWARE_RENDERER
|
// #define GL_ALLOW_SOFTWARE_RENDERER
|
||||||
|
|
||||||
|
@ -577,14 +575,6 @@ const char *OpenGLBackend::Init()
|
||||||
this->persistent_mapping_supported = this->persistent_mapping_supported && (IsOpenGLVersionAtLeast(3, 2) || IsOpenGLExtensionSupported("GL_ARB_sync"));
|
this->persistent_mapping_supported = this->persistent_mapping_supported && (IsOpenGLVersionAtLeast(3, 2) || IsOpenGLExtensionSupported("GL_ARB_sync"));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GL_MAP_PERSISTENT_AMD
|
|
||||||
if (this->persistent_mapping_supported && (strstr(vend, "AMD") != nullptr || strstr(renderer, "Radeon") != nullptr)) {
|
|
||||||
/* AMD GPUs seem to perform badly with persistent buffer mapping, disable it for them. */
|
|
||||||
DEBUG(driver, 3, "OpenGL: Detected AMD GPU, not using persistent buffer mapping due to performance problems");
|
|
||||||
this->persistent_mapping_supported = false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (this->persistent_mapping_supported && !BindPersistentBufferExtensions()) {
|
if (this->persistent_mapping_supported && !BindPersistentBufferExtensions()) {
|
||||||
DEBUG(driver, 1, "OpenGL claims to support persistent buffer mapping but doesn't export all functions, not using persistent mapping.");
|
DEBUG(driver, 1, "OpenGL claims to support persistent buffer mapping but doesn't export all functions, not using persistent mapping.");
|
||||||
this->persistent_mapping_supported = false;
|
this->persistent_mapping_supported = false;
|
||||||
|
|
Loading…
Reference in New Issue