glProgramBinary fails

Hello,

I am trying to use glProgramBinary and glGetProgramBinary on a compute shader, with OpenGL ES 3.2 build 1.10@5371573

I can successfuly obtain a buffer from a successfully Linked & Validated program through glGetProgramBinary.

But when I try to use glProgramBinary, with the buffer & length & binary format value I just got from the first function.
The program GL_LINK_STATUS is set to false, and the info log tells:
Unpack program binary error: could not load corrupt binary data

As expected:
The GL_NUM_BINARY_FORMATS gives me 1
The supported extensions includes: GL_IMG_program_binary, and GL_OES_get_program_binary

I’ve also read about *OES functions here GL_IMG_program_binary (imgtec.com)
So I’ve also tested with both glGetProgramBinary/glProgramBinary and glGetProgramBinaryOES/glProgramBinaryOES but still got the same error.

Could it be related to the program containing only 1 compute shader and no other types ?

Best regards,
Antoine

Hi Antoine,

Thanks for your message, I will look into the issue you are having and try to reproduce it. I will come back once I have more information.

Best regards,
Alejandro

Hi Antoine,

Please see if the same issue occurs when you run our sample. It can be found here: Native_SDK/examples/OpenGLES/BinaryShaders at master · powervr-graphics/Native_SDK · GitHub

If the sample works on your hardware then you can try using your compute shader with it. This will let us know if the issue is caused by the binary conversion of the shader. If you encounter any problems running the sample then please send us your compute shader for us to test.

The supported extensions includes: GL_IMG_program_binary, and GL_OES_get_program_binary

The prefix for the GetProgramBinary extension is OES while the prefix for ProgramBinary is IMG. The binary format might not be compatible between these two extensions. If these are the only supported extensions for GetProgramBinary and ProgramBinary then the issue may be with the driver not supporting matching types or not reporting all the extensions correctly.

Regards,
Thomas

Hi,ThomasW,I also encountered the same problem.

Does the compute shader support this feature on PowerVR GPU?
The same code runs fine on both Adreno GPU and Mali GPU.

My test phone supported extensions includes: GL_IMG_program_binary, and GL_OES_get_program_binary.

Looking forward to your reply, thank you!