forked from bartvdbraak/blender
Allow users enabling workaround for menus with some Mesa3D drivers.
Define the env var BLENDER_FORCE_SWAPBUFFERS to enable (1, yes, oui, the value does not matter, code just checks for existence). The issue seems to happen with Intel and Radeon, but enabling myswapbuffers() hack solves it (or reduces to just flicker) for now. https://bugs.freedesktop.org/show_bug.cgi?id=21774 Reported by Philippe Van Hecke.
This commit is contained in:
parent
41a0bfaf7c
commit
0045a70d96
@ -775,6 +775,20 @@ int is_a_really_crappy_nvidia_card(void)
|
|||||||
return well_is_it;
|
return well_is_it;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int troublesome_mesa_buffers(void)
|
||||||
|
{
|
||||||
|
static int check = -1;
|
||||||
|
|
||||||
|
/* Driver bug is reported upstream, it should be fixed at some point, so do not hardcode */
|
||||||
|
/* It has been reported to happen with intel and radeon drivers, must be something more general (DRI?) */
|
||||||
|
/* https://bugs.freedesktop.org/show_bug.cgi?id=21774 */
|
||||||
|
if (check == -1) {
|
||||||
|
check = (getenv("BLENDER_FORCE_SWAPBUFFERS") != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return check;
|
||||||
|
}
|
||||||
|
|
||||||
void bglFlush(void)
|
void bglFlush(void)
|
||||||
{
|
{
|
||||||
glFlush();
|
glFlush();
|
||||||
@ -782,6 +796,10 @@ void bglFlush(void)
|
|||||||
if(is_a_really_crappy_intel_card())
|
if(is_a_really_crappy_intel_card())
|
||||||
myswapbuffers(); //hack to get mac intel graphics to show frontbuffer
|
myswapbuffers(); //hack to get mac intel graphics to show frontbuffer
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __linux__
|
||||||
|
if(troublesome_mesa_buffers())
|
||||||
|
myswapbuffers();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user