diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-19 22:09:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-19 22:09:35 +0300 |
commit | 06cd12850078d502915aa86bbcd65fc1cd4ec712 (patch) | |
tree | 744048b1250d7b13e2b7330db8438589c9a59bd9 | |
parent | 99c0622fd8c6c81129c6fa788841e28f6c4f4da0 (diff) | |
download | plus-06cd12850078d502915aa86bbcd65fc1cd4ec712.tar.gz plus-06cd12850078d502915aa86bbcd65fc1cd4ec712.tar.bz2 plus-06cd12850078d502915aa86bbcd65fc1cd4ec712.tar.xz plus-06cd12850078d502915aa86bbcd65fc1cd4ec712.zip |
Enable DSA OpenGL extensions support again.
DSA disabled for NVIDIA because DSA in NVIDIA broken.
-rw-r--r-- | src/graphicsmanager.cpp | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 8cdfac108..d03090ad8 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -907,22 +907,36 @@ void GraphicsManager::initOpenGLFunctions() return; } - if (is45) - { - logger->log1("found GL_EXT_direct_state_access"); -// assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2D"); - } - else if (supportExtension("GL_EXT_direct_state_access")) - { - logger->log1("found GL_EXT_direct_state_access"); -// assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2DEXT"); + if (findI(mGlVendor, "NVIDIA") == std::string::npos) + { // not for NVIDIA. in NVIDIA atleast in windows drivers DSA is broken + if (is45) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2D"); + } + else if (supportExtension("GL_EXT_direct_state_access")) + { + logger->log1("found GL_EXT_direct_state_access"); + assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2DEXT"); + } + else if (supportExtension("GL_ARB_direct_state_access")) + { + logger->log1("found GL_ARB_direct_state_access"); + logger->log1("GL_EXT_direct_state_access not found"); + assignFunctionEmu2(glTextureSubImage2D, "glTextureSubImage2DEXT"); + } + else + { + logger->log1("GL_EXT_direct_state_access not found"); + logger->log1("GL_ARB_direct_state_access not found"); + emulateFunction(glTextureSubImage2D); + } } else { - logger->log1("GL_EXT_direct_state_access not found"); -// emulateFunction(glTextureSubImage2D); + logger->log1("Not checked for DSA because on NVIDIA it broken"); + emulateFunction(glTextureSubImage2D); } - emulateFunction(glTextureSubImage2D); if (is12 && (is42 || supportExtension("GL_ARB_texture_storage"))) { |