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

Author Topic: [FIXED] RenderTexture on Intel GPU's. Let's fix this problem!  (Read 35010 times)

0 Members and 1 Guest are viewing this topic.

Ace (SWE)

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #15 on: September 16, 2012, 01:52:44 pm »
Had to register just to be able to say that the 1display branch solves the issue for me on my laptop, well done.

The shader example does seem to use the wrong shader for edge though.

Haikarainen

  • Guest
Re: RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #16 on: September 16, 2012, 02:24:19 pm »
I'm not able to test this out today (probably), but I will certainly test it out when I have time!

I'll test both shaders and rendertextures :)

Great works, thanks szunti!

Szunti

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #17 on: September 16, 2012, 07:51:11 pm »
I think the same intel_do_flush error will happen if you share context between screens regardless of my patch. Is it common to reuse context between screens? Is it allowed at all?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #18 on: September 16, 2012, 07:58:01 pm »
SFML always uses the same screen (the default one).
Laurent Gomila - SFML developer

Haikarainen

  • Guest
Re: RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #19 on: September 16, 2012, 10:39:11 pm »
I think the same intel_do_flush error will happen if you share context between screens regardless of my patch. Is it common to reuse context between screens? Is it allowed at all?

1display-branch worked flawlessly with rendertextures! Will report back with shaders once I've tested them, but why would they be a problem?

EDIT: Have now tried it with both the minimal example I originally created, as well as a personal project of mine. And it totally works :D This is awesome!
« Last Edit: September 16, 2012, 10:46:29 pm by Haikarainen »

Haikarainen

  • Guest
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #20 on: September 17, 2012, 09:48:52 pm »
Allright I have thoroughly tested this branch, and it seems to do what it should perfectly. I have tried both RenderTextures and Shaders, as well as them both together (to "chainlink" shaders).

Also I might have misunderstood the shader issue, was it just an example that broke? Or the whole shader class?  It works flawlessly for me.

Laurent will this be merged anytime soon? I might be able to try it out on AMD hardware as well.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #21 on: September 17, 2012, 10:12:23 pm »
Quote
Laurent will this be merged anytime soon?
I won't merge it directly because the code doesn't follow my conventions, but I'll try to do the modification soon (I'm starting right now).
Laurent Gomila - SFML developer

Haikarainen

  • Guest
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #22 on: September 17, 2012, 10:13:58 pm »
Quote
Laurent will this be merged anytime soon?
I won't merge it directly because the code doesn't follow my conventions, but I'll try to do the modification soon (I'm starting right now).

Great news :) Thanks a lot Laurent and Szunti!

Szunti

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #23 on: September 18, 2012, 10:27:41 pm »
Also I might have misunderstood the shader issue, was it just an example that broke? Or the whole shader class?  It works flawlessly for me.

The shader example is one of the ones that gives the intel_do_flush_locked failed error. Now it runs at least with 1display branch, but the edge post-processing part is wrong because it uses the pixelate shader instead of the correct one, which can be seen with the software renderer.

It's the case for me, and I was curious if it happens for others too. But I guess it's another unrelated bug in the video driver.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #24 on: September 18, 2012, 10:44:18 pm »
I've pushed the modification. Please confirm that it still works :)

And what about other OSes? Does anybody have similar problems on Windows or OS X?
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #25 on: September 18, 2012, 11:08:53 pm »
Is there a minimal code we can directly test? (Maybe the one from Haikarainen's 2nd post?)

What problems were there exactly?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Szunti

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #26 on: September 18, 2012, 11:30:56 pm »
Shader example start, but when I quit gives:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  2 (X_ChangeWindowAttributes)
  Resource id in failed request:  0x1a00007
  Serial number of failed request:  1000
  Current serial number in output stream:  1010
 

which it doesn't do with 1display branch.

EDIT: it happens at the deletion of the last effect.

It seems I suck with gdb + C++, but if you need more info I can try it harder.

Btw it looks wrong to call window.draw(..) and window.display() after window.close() in the example, but it's not the problem, because I changed the order and the error remains.

The examples in this thread works without problem.
« Last Edit: September 18, 2012, 11:36:41 pm by Szunti »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #27 on: September 19, 2012, 07:51:51 am »
Quote
Is there a minimal code we can directly test? (Maybe the one from Haikarainen's 2nd post?)
Calling RenderTexture create/clear/display is enough to trigger the problem.

Quote
which it doesn't do with 1display branch.
Hum :-\
Do you see any major difference between the new code and your branch?

Quote
Btw it looks wrong to call window.draw(..) and window.display() after window.close()
It's not a problem, these are no-op when the window has been closed.
Laurent Gomila - SFML developer

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #28 on: September 19, 2012, 09:59:37 am »
And what about other OSes? Does anybody have similar problems on Windows or OS X?
No problem on OS X with the shader example and an integrated Intel GPU.
Want to play movies in your SFML application? Check out sfeMovie!

Szunti

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [POSSIBLY FIXED] RenderTexture on Intel GPU's. Let's fix this problem!
« Reply #29 on: September 19, 2012, 11:10:58 am »
XFlush on GlxContext.cpp:124 is where it gives the error.

Maybe it's something with the deleted  m_ownsWindow, but I'm too lazy to find out what that does. :D

 

anything