[Mesa-users] GLSL: brw_eu.h assertion setting uniform variable

Jason Tiller jason at sonos.org
Wed May 11 15:48:18 PDT 2011


Hi, All, :)

When trying to use a uniform value in a simple GLSL vertex shader, I
am getting the following abort:

brw_eu.h:177: brw_reg: Assertion `nr < 128' failed.
Aborted

I've tried this using raw GLUT (glGetUniformLocation/getUniform1i) as
well as implementing this in Qt 4.7 (setUniformValue).  The shader
does dead simple Gouraud shading.  I link it along with a super-simple
passthrough fragment shader.  I'm using the uniform variable to pass
in the number of lights in the scene.  I declare the variable at the
top of my shader:

uniform int numlights;

If I turn the variable into a const:

const int numlights = 2;

then it works perfectly.  Of course, I need to pass uniforms into my
shader...

Any ideas?  I'm running:

Kubuntu 11.04 (turned off all effects in KWin)
KDE 4.6.3
Qt 4.7.2
Intel i5 430M w/i915 embedded graphics
OpenGL 2.1, Mesa 7.10.2
Xorg 1.10.1-1ubuntu1

I'm desperate!  This makes no sense at all to me, and I have no idea
where to go from here.

Thank you!

---Jason

P.S. - I've tried fiddling with MESA_GLSL=... and can see my shaders
getting compiled, the program being used, and the uniform variable
being set... but still the abort.  HELP!


More information about the mesa-users mailing list