Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML2.0rc and Radeons  (Read 3403 times)

0 Members and 2 Guests are viewing this topic.

elvis

  • Newbie
  • *
  • Posts: 5
    • View Profile
SFML2.0rc and Radeons
« on: August 08, 2012, 10:23:31 pm »
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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML2.0rc and Radeons
« Reply #1 on: August 08, 2012, 10:36:09 pm »
This seems more like a Linux driver issue, have you tried another driver?
Also what exactly triggers that error?
Have you tried the latest commit on GitHub?
And does your graphics card support texture sizes as big as 1024x768?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

elvis

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML2.0rc and Radeons
« Reply #2 on: August 08, 2012, 10:45:44 pm »
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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML2.0rc and Radeons
« Reply #3 on: August 08, 2012, 10:49:07 pm »
How well do other OpenGL applications perform?
Also since that one command is really quite long, could give the exacte call backtrace or use temporary objects to see which function does crash the application?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

elvis

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML2.0rc and Radeons
« Reply #4 on: August 08, 2012, 11:03:01 pm »
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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: SFML2.0rc and Radeons
« Reply #5 on: August 08, 2012, 11:07:45 pm »
Also what Linux distribution are you using? Was that kernel already brought to you by the official distribution package manager?

How well do other OpenGL applications perform?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

elvis

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML2.0rc and Radeons
« Reply #6 on: August 08, 2012, 11:28:46 pm »
Quote
Also what Linux distribution are you using?
Linux Mint 13 "Maya"
Quote
Was that kernel already brought to you by the official distribution package manager?
3.5 was installed by me, but I tried on stock kernel and problem still exists.
Quote
How well do other OpenGL applications perform?
OpenArena runs like a dream.

fer_t

  • Newbie
  • *
  • Posts: 18
    • View Profile
    • Email
Re: SFML2.0rc and Radeons
« Reply #7 on: August 09, 2012, 04:30:54 pm »
Which version of MESA do you use?

For me it works with Kernel 3.1.10, MESA 7.11 and radeonHD driver.
BR

elvis

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: SFML2.0rc and Radeons
« Reply #8 on: August 09, 2012, 09:46:19 pm »
Which version of MESA do you use?

OpenGL renderer string: Gallium 0.4 on ATI RV570
OpenGL version string: 2.1 Mesa 8.0.2

And xserver-xorg-video-radeon driver.

Small update:
"radeon: The kernel rejected CS, see dmesg for more information" is printed when RenderTexture::display(), RenderTexture::getTexture() and RenderTexture::saveToFile() are called.

Another update:
I've tried to force SFML to use default implementation of RenderTexture (I found it somewhere in thread about intel gpus) - it doesn't help.
« Last Edit: August 09, 2012, 10:36:04 pm by elvis »