Added comments to the Bugs struct in OpenGL.h detailing some driver bugs that have workarounds that don't need conditional codepaths.

This commit is contained in:
Alex Szpakowski
2016-01-10 16:12:51 -04:00
parent 6d6d805858
commit 8a59743481
+29 -9
View File
@@ -171,16 +171,36 @@ public:
struct Bugs
{
// On AMD's Windows (and probably Linux) drivers,
// glBindFramebuffer + glClear + glBindFramebuffer + draw(fbo_tex) won't
// work unless there's some kind of draw or state change which causes
// the texture's contents to update (just drawing the texture won't
// always do it).
// Activating shader program 0 and then activating the actual program
// seems to always 'fix' it for me.
// Bug observed January 2016 with multiple AMD GPUs and driver versions.
// https://love2d.org/forums/viewtopic.php?f=4&t=81496
/**
* On AMD's Windows (and probably Linux) drivers,
* glBindFramebuffer + glClear + glBindFramebuffer + draw(fbo_tex) won't
* work unless there's some kind of draw or state change which causes
* the texture's contents to update (just drawing the texture won't
* always do it).
* Activating shader program 0 and then activating the actual program
* seems to always 'fix' it for me.
* Bug observed January 2016 with multiple AMD GPUs and driver versions.
* https://love2d.org/forums/viewtopic.php?f=4&t=81496
**/
bool clearRequiresDriverTextureStateUpdate;
/**
* Other bugs which have workarounds that don't use conditional code at
* the moment:
*
* Kepler nvidia GPUs in at least OS X 10.10 and 10.11 fail to render
* geometry with glDrawElements if index data comes from a Buffer
* Object but and vertex data doesn't. One workaround is to use a
* CPU-side index array when there's also a CPU-side vertex array.
* https://love2d.org/forums/viewtopic.php?f=4&t=81401&start=10
*
* Some android drivers don't seem to initialize the sampler index
* values of sampler uniforms in shaders to 0 (which is required by the
* GLSL ES specification) when linking the shader program. One
* workaround is to always set the values of said sampler uniforms to 0
* just after linking the shader program.
* https://love2d.org/forums/viewtopic.php?f=4&t=81458
**/
} bugs;
OpenGL();