[lightpreview] all geometry is pure white
Closed this issue · 5 comments
When using lightpreview I get the following errors upon loading a BSP, and all geometry is pure white regardless of which mode I select. I tried building from 08ae1540de5e070debf8bf94cadfc4d573ab44d2
to see if this is a recent regression but nothing changed. My iGPU has OpenGL 3.30 Core, and up to 4.6 (compatibility profile).
"GL_INVALID_OPERATION in glUniform1(uniform \"MVP\"@0 is matrix)"
"GL_INVALID_OPERATION in glUniform(location=1)"
"GL_INVALID_OPERATION in glUniform(location=2)"
"GL_INVALID_OPERATION in glUniform(location=3)"
"GL_INVALID_OPERATION in glUniform(location=4)"
"GL_INVALID_OPERATION in glUniform(location=5)"
"GL_INVALID_OPERATION in glUniform(location=6)"
"GL_INVALID_OPERATION in glUniform(location=7)"
"GL_INVALID_OPERATION in glUniform(location=8)"
[TRUNCATED]
[REPEATS UNTIL LOCATION 254 INCLUSIVE]
[REPEATS UNTIL LOCATION 254 INCLUSIVE]
Suggests it might be the uniform float style_scalars[256];
causing this. Maybe too large of a uniform array?
What's the GPU, OS, GPU driver? I'm only testing on a 1070 Ti/Win11/NVIDIA 536.40 at the moment.
Yeah sounds like it didn't even load the other uniforms - it's calling glUniform1(value, 0)
up until 254 since that's how many styles there are. We need error checking on load I think (we don't ever validate the uniform locations).
Oops. Nice catch.
6b83f36 fixes a glsl syntax error reported on mesa; might help..
fixed, thanks!