I'm not 100% sure if I like this one. If used, it'll be squashed in with the previous patch. --- src/mesa/main/format_pack.c.mako | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/mesa/main/format_pack.c.mako b/src/mesa/main/format_pack.c.mako index 13a20c1..45caafc 100644 --- a/src/mesa/main/format_pack.c.mako +++ b/src/mesa/main/format_pack.c.mako @@ -117,9 +117,10 @@ pack_ubyte_${f.short_name()}(const GLubyte src[4], void *dst) ${format_datatype(f)} d = 0; %for (i, c) in enumerate(f.channels): %if c.type == 'x': - <% continue %> + d |= PACK(MAX_INT(${c.size}), ${c.shift}, ${c.size}); + %else: + d |= PACK(${c.name}, ${c.shift}, ${c.size}); %endif - d |= PACK(${c.name}, ${c.shift}, ${c.size}); %endfor (*(${format_datatype(f)} *)dst) = d; %else: @@ -204,9 +205,10 @@ pack_float_${f.short_name()}(const GLfloat src[4], void *dst) ${format_datatype(f)} d = 0; %for (i, c) in enumerate(f.channels): %if c.type == 'x': - <% continue %> + d |= PACK(MAX_INT(${c.size}), ${c.shift}, ${c.size}); + %else: + d |= PACK(${c.name}, ${c.shift}, ${c.size}); %endif - d |= PACK(${c.name}, ${c.shift}, ${c.size}); %endfor (*(${format_datatype(f)} *)dst) = d; %else: -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev