[Mesa-dev] [PATCH 05/13] mesa: add double uniform support. (v4)

Ilia Mirkin imirkin at alum.mit.edu
Thu Feb 5 19:21:01 PST 2015


On Thu, Feb 5, 2015 at 2:49 AM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Feb 4, 2015 at 11:27 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> diff --git a/src/mesa/program/prog_parameter.c b/src/mesa/program/prog_parameter.c
>> index 0ef4641..e1bbc00 100644
>> --- a/src/mesa/program/prog_parameter.c
>> +++ b/src/mesa/program/prog_parameter.c
>> @@ -111,7 +111,13 @@ _mesa_add_parameter(struct gl_program_parameter_list *paramList,
>>                      const gl_state_index state[STATE_LENGTH])
>>  {
>>     const GLuint oldNum = paramList->NumParameters;
>> -   const GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */
>> +   GLuint sz4 = (size + 3) / 4; /* no. of new param slots needed */
>> +   int actual_size = size;
>> +
>> +   if (mesa_type_is_double(datatype)) {
>> +      actual_size *= 2;
>> +      sz4 = ((actual_size + 3) / 4);
>> +   }
>>
>>     assert(size > 0);
>>
>
> Does this really need to be updated? I thought this code was just for
> ARB vp/fp programs.

No clue. Dave?


More information about the mesa-dev mailing list