This issue was solved faster than anyone could think! Thanks to everyone involved, great effort!
At the time of writing you still need the git-version of sfml2 for the fix to be appliedThis has been a known problem for a while now and it is really annoying, since RenderTexture is a huge asset to the SFML library.
I would like to gather all information possible on this problem and fix this once in for all (on linux at least, dont know if it happens on windows). I know a lot of people have been working hard debugging this problem, as have I, and I would really love it if we could gather all the people who are willing to work on this and actually fix it.
If you think you can help in any way, reply in this thread. If you need some sort of inspiration, please let it be known that Intel engineers are working fullspeed on fixing their drivers for other issues, mostly because of the Valve-Intel-cooperation on porting Steam to Linux.
The information I've gathered so far, by debugging:I get error
intel_do_flush_locked No such file or directory
When calling RenderTexture::display(). On my unoptimized testbed it is always the third call of one instance.
gdb does not return any sigtrap/segfault or any other error.
I have tried forcing SFML to use the fallback mechanism (context from hidden window) instead of FBO by forcing priv::RenderTextureImplFBO::isAvailable() to return false, did not do any difference.
Tried both SNA and UXA acceleration.
I have tried to track down the error down to the XFree86's Intel drivers sourcecode(2.20.7)
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/, and I think it's related to the function intel_batch_do_flush on line 119 of file intel_batchbuffer.c:
static void intel_batch_do_flush(ScrnInfoPtr scrn)
{
intel_screen_private *intel = intel_get_screen_private(scrn);
struct intel_pixmap *priv;
list_for_each_entry(priv, &intel->batch_pixmaps, batch)
priv->dirty = 0;
}
I am not sure though, I cant find any file that contains parts of the error I get, so it's a tough nut to crack. Given that it is a "No such file"-error it should be an easy fix though.
I will set up
a virtualbox instance a partition on my laptop with a custom linuxsetup as a proper testbed, create a minimal reproduction of the error with the latest SFML so I can truly debug both SFML code as well as driver-code without messing up my box.
Any information hugely appreciated, current set up for these results:
ArchLinux Kernel 3.5.3-1-ARCH x86_64
Intel Core i7 3610-QM
Intel Graphics HD 4000 running xf86-video-intel-sna driverpackage from official arch repos.
4 GB Memory DDR3 (Shared with GPU)
SFML 2.0