Added a workaround for an AMD driver bug where setCanvas + clear + setCanvas doesn't work.

This commit is contained in:
Alex Szpakowski
2016-01-09 17:14:05 -04:00
parent 9d6ff6e5de
commit 4f093e7fac
4 changed files with 50 additions and 0 deletions
+13
View File
@@ -169,6 +169,19 @@ public:
int framebufferBinds;
} stats;
struct Bugs
{
// On AMD's Windows (and probably Linux) drivers,
// glBindFramebuffer + glClear + glBindFramebuffer won't work unless
// there's a draw in between the glBindFramebuffer calls (or unless
// there's some other thing that causes the driver to avoid the buggy
// "fast path", e.g. if the scissor test is active and its rectangle
// doesn't cover the whole framebuffer).
// Bug observed January 2016 with multiple AMD GPUs and driver versions.
// https://love2d.org/forums/viewtopic.php?f=4&t=81496
bool clearRequiresDummyDraw;
} bugs;
OpenGL();
/**