mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Fall back to glTexImage instead of glTexStorage on Radeon 3xxx drivers on Windows. Potentially works around a graphics driver bug which prevented text from showing up.
This commit is contained in:
@@ -156,6 +156,18 @@ bool OpenGL::initContext()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef LOVE_WINDOWS
|
||||||
|
if (getVendor() == VENDOR_AMD)
|
||||||
|
{
|
||||||
|
// Radeon HD drivers switched from "ATI Radeon" to "AMD Radeon" around
|
||||||
|
// the 7000 series. We'll assume this bug doesn't affect those newer
|
||||||
|
// GPUs / drivers.
|
||||||
|
const char *device = (const char *) glGetString(GL_RENDERER);
|
||||||
|
if (strstr(device, "ATI Radeon HD "))
|
||||||
|
bugs.texStorageBreaksSubImage = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
contextInitialized = true;
|
contextInitialized = true;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -282,7 +294,7 @@ void OpenGL::initVendor()
|
|||||||
|
|
||||||
// http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR
|
// http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR
|
||||||
// http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices
|
// http://stackoverflow.com/questions/2093594/opengl-extensions-available-on-different-android-devices
|
||||||
// http://opengl.gpuinfo.org/gl_stats_caps_single.php?listreportsbycap=GL_VENDOR
|
// https://opengl.gpuinfo.org/displaycapability.php?name=GL_VENDOR
|
||||||
if (strstr(vstr, "ATI Technologies") || strstr(vstr, "AMD") || strstr(vstr, "Advanced Micro Devices"))
|
if (strstr(vstr, "ATI Technologies") || strstr(vstr, "AMD") || strstr(vstr, "Advanced Micro Devices"))
|
||||||
vendor = VENDOR_AMD;
|
vendor = VENDOR_AMD;
|
||||||
else if (strstr(vstr, "NVIDIA"))
|
else if (strstr(vstr, "NVIDIA"))
|
||||||
@@ -1168,6 +1180,9 @@ bool OpenGL::isTexStorageSupported()
|
|||||||
supportsTexStorage = true;
|
supportsTexStorage = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (gl.bugs.texStorageBreaksSubImage)
|
||||||
|
supportsTexStorage = false;
|
||||||
|
|
||||||
return supportsTexStorage;
|
return supportsTexStorage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -159,6 +159,16 @@ public:
|
|||||||
**/
|
**/
|
||||||
bool clientWaitSyncStalls;
|
bool clientWaitSyncStalls;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* glTexStorage on some older AMD/ATI graphics drivers on Windows seems
|
||||||
|
* to break subsequent sub-rectangle glTexSubImage calls after an
|
||||||
|
* initial full-size one (determined after some investigation with an
|
||||||
|
* affected user on Discord.)
|
||||||
|
* https://bitbucket.org/rude/love/issues/1436/bug-with-lovegraphicsprint-on-older-ati
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
bool texStorageBreaksSubImage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Other bugs which have workarounds that don't use conditional code at
|
* Other bugs which have workarounds that don't use conditional code at
|
||||||
* the moment:
|
* the moment:
|
||||||
|
|||||||
Reference in New Issue
Block a user