Bug/ARB request-use GL_ARB_framebuffer_object instead of EXT

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Bug/ARB request-use GL_ARB_framebuffer_object instead of EXT

Post by devsh »

My deferred renderer doesn't want to work on my dx11 ATi card because of the way irrlicht handles FBOs.

Irrlicht's FBO system must have been written long before OGL 3.0. Now my nvidia card is fine with the EXT version of FBO because nvidia is a lot more lenient on the specifications and I was allowed 3 RGBA8 bit RTTs together with a 32bit float single channel RTT for depth in a 128bit MRT. However ATI's implementation is a lot more conservative and does not allow mixed color attachment formats (because EXT spec doesn't require ATI to do so).

Now that FBOs are core, I would request using the ARB extension whenever possible. As it guarantees mixed format attachments and even MIXED DIMENSION ATTACHMENTS!

Here is a quote from stackoverflow from an answer guy who had problems with ATi cards.
What additional functionality does this extension include over EXT_framebuffer_object?

Currently we incorporate the following layered extensions:

* EXT_framebuffer_multisample
* EXT_framebuffer_blit
* EXT_packed_depth_stencil
As well as the following features:

* Permit attachments with different width and height (mixed
dimensions)

* Permit color attachments with different formats (mixed
formats).

* Render to 1 and 2 component R/RG formats that are provided
via the ARB_texture_rg extension. L/A/LA/I will be
left for a separate (trivial) extension.
I will obviously try to provide a fix myself (if you want it fast do it yourself), but I'm asking for it to be done in irrlicht 1.8 for the benefit of other irrlicht'ers.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bug/ARB request-use GL_ARB_framebuffer_object instead of

Post by hybrid »

Changing the test order (or adding a test for ARB if it's currently missing) is not so much of a problem. However, adding proper support would also mean altering the RTT checks and properly handling mixed MRTs in case of only EXT support. Not sure if this is as easy.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Bug/ARB request-use GL_ARB_framebuffer_object instead of

Post by devsh »

However, adding proper support would also mean altering the RTT checks and properly handling mixed MRTs in case of only EXT support. Not sure if this is as easy.
EXT may or may not support mixed MRTs,and we can already pass mixed format RTTs.There are no checks and you dont handle the MRTs with EXT anyway.So you might as well add the ARB support. TheEXT doesn't even spit out FRAMEBUFFER_INCOMPLETE.

As for the actual feature availability handling, make a new driver feature EVDF_MIXED_FORMAT_MRT (only formats, bit depths stay the same).It will be automatically true if Feature[IRR_ARB_framebuffer_object] is available, and there is an openGL feature string for checking "mixed FBO attachments"(so thats to check the feature with only EXT). And dx9 has some easy way of telling whether card supports mixedformat (same depth) MRTs, accordingto all my knowledge.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bug/ARB request-use GL_ARB_framebuffer_object instead of

Post by hybrid »

Ok, first half done. Please notify me about which parts are still missing.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Bug/ARB request-use GL_ARB_framebuffer_object instead of

Post by devsh »

I managed to fix my renderer by deleting the EXT in function names etc. (obv I still left the EXT for low end machines for some reason).
I can mix formats now, no probs. Even make an MRT with uneven bit depth attachments.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Bug/ARB request-use GL_ARB_framebuffer_object instead of

Post by hybrid »

That was not the question. I already changed all gl calls to the ARB version in SVN/trunk. My question was: What is still missing in the current code as found in trunk?!
Post Reply