mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 09:33:49 +02:00
BUGZ-753: bad skyboxes on intel GPUs
This commit is contained in:
parent
bee8ba489a
commit
11f47ddeed
3 changed files with 18 additions and 2 deletions
|
@ -26,13 +26,19 @@ size_t evalGLFormatSwapchainPixelSize(const QSurfaceFormat& format) {
|
|||
return pixelSize;
|
||||
}
|
||||
|
||||
static bool FORCE_DISABLE_OPENGL_45 = false;
|
||||
|
||||
void gl::setDisableGl45(bool disable) {
|
||||
FORCE_DISABLE_OPENGL_45 = disable;
|
||||
}
|
||||
|
||||
bool gl::disableGl45() {
|
||||
#if defined(USE_GLES)
|
||||
return false;
|
||||
#else
|
||||
static const QString DEBUG_FLAG("HIFI_DISABLE_OPENGL_45");
|
||||
static bool disableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG);
|
||||
return disableOpenGL45;
|
||||
return FORCE_DISABLE_OPENGL_45 || disableOpenGL45;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -202,6 +208,15 @@ uint16_t gl::getAvailableVersion() {
|
|||
return;
|
||||
}
|
||||
gl::initModuleGl();
|
||||
|
||||
std::string glvendor{ (const char*)glGetString(GL_VENDOR) };
|
||||
std::transform(glvendor.begin(), glvendor.end(), glvendor.begin(), ::tolower);
|
||||
|
||||
// Intel has *notoriously* buggy DSA implementations, especially around cubemaps
|
||||
if (std::string::npos != glvendor.find("intel")) {
|
||||
gl::setDisableGl45(true);
|
||||
}
|
||||
|
||||
wglMakeCurrent(0, 0);
|
||||
hGLRC.reset();
|
||||
if (!wglChoosePixelFormatARB || !wglCreateContextAttribsARB) {
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace gl {
|
|||
bool checkGLErrorDebug(const char* name);
|
||||
|
||||
bool disableGl45();
|
||||
void setDisableGl45(bool disable);
|
||||
|
||||
uint16_t getTargetVersion();
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
|
|||
link_hifi_libraries(
|
||||
shared task networking gl
|
||||
ktx shaders gpu procedural octree image
|
||||
graphics model-networking fbx hfm animation
|
||||
graphics model-networking fbx hfm animation material-networking
|
||||
script-engine render render-utils
|
||||
${PLATFORM_GL_BACKEND}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue