Setting Shaders Constants/Uniforms (crash on Intel and fix)

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:

Setting Shaders Constants/Uniforms (crash on Intel and fix)

Post by devsh »

Seems that compatibility context in intel drivers reports gl_ModelViewProjectInverse as a Uniform etc. so char* allocation fails to allocate enough space most of the time

Code: Select all

 
    GLint maxlen = 0;
    glGetProgramiv(Program2, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxlen);
 
    if (maxlen < 0)
    {
        os::Printer::log("GLSL: failed to retrieve uniform information", ELL_ERROR);
        return false;
    }
    maxlen = core::max_(maxlen,36); // gl_MVPInv for Intel drivers
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by hendu »

That is a bug in the Intel Windows driver, it cannot claim that a uniform exists and then say it has no name. Was also seen in STK.

I wouldn't bother working around such obvious violations of the GL spec.


Others have seen it too, for example
http://www.opengl.org/discussion_boards ... miv-output
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by devsh »

its not like you'll make irrlicht slower by enforcing a minimum allocation size
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by hendu »

It's a clear violation of the spec. Working around it would mean acceptance of that behavior.

Much better would be to put pressure on Intel to fix their crappy drivers.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by Nadro »

I agree with Hendu. We shouldn't apply workaround for bugged drivers. I hope that Intel will fix this bug.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by ent1ty »

You, my friends, just got owned :lol:
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by hendu »

devsh wrote:haha.. like you're putting pressure on Intel
Perhaps you'd like to help? Put BAW in some news, while loudly complaining about Intel Windows.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by devsh »

Well I done my part

https://www.buildaworld.net/forum/devel ... l-hd-linux
https://www.buildaworld.net/forum/beta/ ... aint-heart
http://irrlicht.sourceforge.net/forum/v ... 82#p283995
https://www.buildaworld.net/forum/beta/ ... -known-bug

And by sodan in denmark
- fixed a problem with GLSL shaders on more messed up drivers (Intel HD 4000 and some AMD)
http://www.spiludvikling.dk/viewtopic.p ... 778#p12778
og i den anledning vil jeg gerne bande over Intel's grafikkort drivere til Windows 8 64 bit. I guder noget bras)
http://www.spiludvikling.dk/viewtopic.p ... 305#p13305

And on our facebook page
Intel- grafikkort-driverne er fulde af fejl på win8 64bit. Dit nvidiakort er også 10 gange hurtigere.
Now you can promote BAW so my whining gets famous
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by hendu »

You have old info in there. Intel's Linux drivers are much higher quality than their Windows or Mac drivers.
* Linux has not got drivers which implement OpenGL higher than 2.1
False, Intel supports 3.3 and Radeon 3.1. They only implement Core Contexts though, so unless you use one, they will report GL 3.0.
(10x slower than Windows drivers)
In the latest tests it's quite competitive:
Iris Pro http://www.phoronix.com/scan.php?page=a ... edux&num=2
Ivy http://www.phoronix.com/scan.php?page=a ... pare&num=2
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: Setting Shaders Constants/Uniforms (crash on Intel and f

Post by devsh »

at the time of writing, Mesa was at 9.1 or 9.0 and barely implemented 3.1

also, 4th gen core i werent out
Post Reply