Page 1 of 1

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

Posted: Fri Dec 13, 2013 9:47 pm
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

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

Posted: Sat Dec 14, 2013 11:20 am
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

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

Posted: Sat Dec 14, 2013 5:15 pm
by devsh
its not like you'll make irrlicht slower by enforcing a minimum allocation size

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

Posted: Sun Dec 15, 2013 8:34 am
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.

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

Posted: Mon Dec 16, 2013 11:09 am
by Nadro
I agree with Hendu. We shouldn't apply workaround for bugged drivers. I hope that Intel will fix this bug.

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

Posted: Mon Dec 16, 2013 3:14 pm
by devsh
haha.. like you're putting pressure on Intel

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

Posted: Mon Dec 16, 2013 3:37 pm
by ent1ty
You, my friends, just got owned :lol:

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

Posted: Mon Dec 16, 2013 3:42 pm
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.

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

Posted: Mon Dec 16, 2013 10:25 pm
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

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

Posted: Tue Dec 17, 2013 11:12 am
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

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

Posted: Wed Dec 18, 2013 11:33 am
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