View Full Version : Assertion in brw_eu.h when setting uniform var

Jason Tiller
05-11-2011, 03:55 PM
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.

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'm passing 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!


P.S. - I've looked at Mesa's debug output via MESA_GLSL and it all looks OK, as far as I can tell.