[Mesa-dev] V3 i965/Gallium ARB_get_program_binary support

Tapani Pälli tapani.palli at intel.com
Thu Dec 7 12:10:20 UTC 2017

On 12/07/2017 01:47 PM, Tapani Pälli wrote:
> Hi;
> I've been testing this functionality with little app I have and I 
> noticed one thing by accident.
> If I call link twice for a regular program like this:
> glLinkProgram(program);
> glLinkProgram(program);
> everything's fine, sequential calls do not generate errors. However for 
> program loaded via glProgramBinaryOES it seems not ok for some reason. 
> Should it be? It throws error on glUseProgram() saying that program not 
> linked.

Studying specs a bit more it is supposed to fail, there are no shaders 
to link. If I attach new shaders after glProgramBinaryOES and then call 
glLinkProgram() it links succesfully and works fine. So no worries!

> Thanks;
> On 11/29/2017 03:24 AM, Timothy Arceri wrote:
>> V3:
>> This is basically the V2 that Jordan sent with feedback addressed,
>> gallium support added, some minor functional changes such as only
>> storing the default uniforms to either disk or program binary cache
>> (rather than fixing them up later) and some refactoring to allow
>> greater code sharing between gallium and i965.
>> This series adds i965/gallium support for ARB_get_program_binary
>> with greater than 0 supported formats. Today we support this extension,
>> but advertise support for 0 formats. This series allows i965/gallium
>> to advertise support for 1 format.
>> This series defines a common Mesa format for ARB_get_program_binary,
>> along with helper functions to read and write the format. The binary
>> saved can only be reloaded on the exact same Mesa build using the
>> exact same hardware.
>> The i965/gallium implementation saves out a serialized nir/tgsi
>> represenation of the program. For i965 we can later add support for
>> saving the gen binary program as well. (We will still need the nir
>> program for state based recompiles.)
>> This implementation passes piglit, deqp and glcts functions. It also
>> works with (and fixes a crash in) Dead Island with makes use of the
>> extension.
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

More information about the mesa-dev mailing list