Imagination PowerVR SDK Blog

GLSL shader compiler crash


#1

Hello guys,



I think I found a crash in the shader compilers.

It happens when you try to pass an uniform array to a function which expects a different precision qualifier.



Here is the simple code to reproduce it:

uniform mediump float mpArray[1];



void crash(lowp float lpArray[1]){}



void main()

{

crash(mpArray);

gl_FragColor = vec4(1.);

}





The output on Windows says: ERROR: Could not encode the binary due to a problem during compilation.

It happens with all SGX compilers (glslcompiler_sgx5XX.exe), in vertex shaders and fragment shaders.



(I also tried to compile it on IOS with glCompileShader and it crash with a bad access exception.)



Sorry if this is not the right place to report that kind of things :slight_smile:

Cheers!


#2

Hi,



Sorry for the very slow response. Thanks for the report - I’ve reproduced it and have filed a bug against our compiler. Hope this wasn’t a blocking issue for you!



We’ve recently launched a public feature request/bug reporting system: https://pvrsupport.imgtec.com/feedback

This is the best place to file any feedback you may have in the future :slight_smile:



Cheers,

Joe