Hello guys!
This is my first post here and I hope it is not the last one :D.
I work on Linux with 3.5 kernel and radeon x1950 card (mesa drivers) and suddenly, when I was getting used to SFML, a quite annoying problem occured:
piotr@piotr-desktop ~/Dropbox/Programowanie/sandbox/SFML2/testMap $ ./SFML
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
radeon: The kernel rejected CS, see dmesg for more information.
and dmesg:
[ 7813.364328] [drm:radeon_cs_parser_relocs] *ERROR* gem object lookup failed 0x8
[ 7813.364337] [drm:radeon_cs_ioctl] *ERROR* Failed to parse relocation -2!
This problem occures when I try to use sf::RenderTexture i.e.:
sf::RenderTexture textureMap;
if(!textureMap.create(1024,768))
{
return -1;
}
textureMap.clear(sf::Color::Red);
textureMap.draw(layers[0]);
textureMap.draw(layers[1]);
textureMap.display();
sf::Sprite tMap(textureMap.getTexture());
//because it rendered glitches on screen i tried to save it to the file and verify the result
textureMap.getTexture().copyToImage().saveToFile("dupa.png");
I found out (searching this forum and google) that probably static linking will solve the problem but c'mon static linking on linux? It seems that it's only a dirty workaround. Do you have any ideas how to solve this problem? Is someone trying to fix it?
I didin't because my old card is not supported by AMD anymore, and old drivers doesn't work with new XOrg at all.
Error is triggered by:
textureMap.getTexture().copyToImage().saveToFile("dupa.png");
but if I remove this line and I will try to print the texture on the window I get nothing more than glitches.
I didn't try latest commit. Tag 2.0rc was used only.
Max texture size for my card is 4096x4096.
Gdb says that the problem is in sImg.saveToFile("dupa.png");. But it doesn't crush the application. It seems that the problem is on kernel (drivers) side. Because:
radeon: The kernel rejected CS, see dmesg for more information.
Is printed by kernel.