[Mesa-dev] [PATCH v2 17/23] mesa: Add non-normalized formats support for ubyte packing functions

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Dec 2 00:02:19 PST 2014



On 01/12/14 20:14, Jason Ekstrand wrote:
> On Mon, Dec 1, 2014 at 3:04 AM, Iago Toral Quiroga <itoral at igalia.com>
> wrote:
> 
>> From: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>>
>> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias at igalia.com>
>> ---
>>  src/mesa/main/format_pack.c.mako | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/main/format_pack.c.mako
>> b/src/mesa/main/format_pack.c.mako
>> index 7feb3f8..6815bf3 100644
>> --- a/src/mesa/main/format_pack.c.mako
>> +++ b/src/mesa/main/format_pack.c.mako
>> @@ -83,7 +83,9 @@ pack_ubyte_${f.short_name()}(const GLubyte src[4], void
>> *dst)
>>        %endif
>>
>>        ${c.datatype()} ${c.name} =
>> -      %if c.type == parser.UNSIGNED:
>> +      %if not f.is_normalized() and f.is_int():
>> +            (${c.datatype()}) src[${i}];
>>
> 
> Clamping
> 

Working on it.

Sam

> 
>> +      %elif c.type == parser.UNSIGNED:
>>           %if f.colorspace == 'srgb' and c.name in 'rgb':
>>              util_format_linear_to_srgb_8unorm(src[${i}]);
>>           %else:
>> --
>> 1.9.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
> 
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list