shaderapi.c always stores 0 for GL_PROGRAM_BINARY_LENGTH when placing a ProgramParameter call. This unfortunately is not a valid value to store there unless GL_LINK_STATUS is GL_FALSE. The size returned by this call should be the amount of bytes required to place a call to GetProgramBinary. There seems to be no way in mesa to safely obtain a program binary without trying GetProgramBinary in a loop, reallocating the buffer as necessary to store the binary until it succeeds. Unfortunately there is no way to distinguish if the function call is failing because of lack of memory or because of something else.
A minor quick fix may look something like this: >> size_t size = 0; >> case GL_PROGRAM_BINARY_LENGTH: >> free(mesa_program_serialize(shProg, &size)); >> *params = size; >> return; Though to be fair, mesa_program_serialize should have an option to query just the size without allocating memory (using blob.position())
Mesa does not support program binary extension, you seem to be using a custom branch (?)
The extension is supported, but there are no binary formats supported. Since there is no binary format, there is no data in any binary format. It's a bit of a dirty trick, but it is what it is.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.