[Mesa-dev] [wip 8/9] glsl: functions to serialize gl_shader and gl_shader_program
Paul Berry
stereotype441 at gmail.com
Fri Jan 17 08:59:35 PST 2014
On 15 January 2014 02:46, Tapani <tapani.palli at intel.com> wrote:
> On 01/14/2014 07:53 PM, Paul Berry wrote:
>
> On 2 January 2014 03:58, Tapani Pälli <tapani.palli at intel.com> wrote:
>
>> +static void
>>> +serialize_uniform_storage(gl_uniform_storage *uni, memory_writer &blob)
>>>
>>
>> I don't think this is right. The ARB_get_program_binary spec says:
>>
>> 8. How does ProgramBinary interact with uniform values, including
>> shader-specified defaults?
>>
>> RESOLVED: All uniforms specified in the binary are reset to their
>> shader-
>> specified defaults, or to zero if they aren't specified, when the
>> program
>> binary is loaded. The spec language has been updated to specify this
>> behavior.
>>
>> The OES_get_program_binary spec doesn't mention uniforms at all, but I
>> believe this is not intended to indicate a behavioural difference--it's
>> just a consequence of the fact that ARB_get_program_binary was written
>> later, so they had a chance to clarify things. In fact, issue #7 in
>> ARB_get_program_binary specifically says:
>>
>> 7. How does this spec differ from the OES_get_program_binary and why?
>>
>> ...
>>
>> There are other areas where language was clarified, but this is meant
>> to
>> be consistent with the intent of the original specification and not to
>> alter previously established behavior.
>>
>> So I believe we shouldn't be serializing uniform values.
>>
>>
>> For me this seemed much easier way to serialize than recreate it though.
> Would it be enough if I reset the default values in place?
>
Yes, I think that would be reasonable. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140117/e84be62e/attachment.html>
More information about the mesa-dev
mailing list