From 9beb302212a2afac408016cbd7b93c8b859e4910 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Fri, 26 Feb 2010 16:45:22 +0000 Subject: util: Code generate functions to pack and unpack a single pixel. Should work correctly for all pixel formats except SRGB formats. Generated code made much simpler by defining the pixel format as a C structure. For example this is the generated structure for PIPE_FORMAT_B6UG5SR5S_NORM: union util_format_b6ug5sr5s_norm { uint16_t value; struct { int r:5; int g:5; unsigned b:6; } chan; }; Not used everywhere yet because it seems compiled code is slower than bitshift arithmetic by some misterious reason. So we should generate bitshift arithmetic at least for the simple UNORM pixel formats. --- src/gallium/auxiliary/util/.gitignore | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gallium/auxiliary/util/.gitignore') diff --git a/src/gallium/auxiliary/util/.gitignore b/src/gallium/auxiliary/util/.gitignore index 29c586c9b51..448d2f304fb 100644 --- a/src/gallium/auxiliary/util/.gitignore +++ b/src/gallium/auxiliary/util/.gitignore @@ -1,2 +1,3 @@ u_format_access.c u_format_table.c +u_format_pack.h -- cgit v1.2.3