From 3ff175d6de89ad92d167362355501f99d06f0f97 Mon Sep 17 00:00:00 2001 From: Luca Barbieri Date: Wed, 24 Mar 2010 18:12:45 +0100 Subject: gallium/util: add fast half float conversion functions This adds a fast half float conversion facility to Gallium. Mesa already contains such a facility, but using a much worse algorithm. This one is an implementation of www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf and uses a branch-less algorithm with some lookup tables small enough to fit in the L1 cache. Ideally, Mesa should start using these functions too, but I'm not sure how to arrange that with the current build system. A new "u_gctors.cpp" is added that defines a global C++ constructor allowing to initialize to conversion lookup tables at library init. --- src/gallium/auxiliary/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/auxiliary/Makefile') diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile index 4c629924b9..14c0fb1840 100644 --- a/src/gallium/auxiliary/Makefile +++ b/src/gallium/auxiliary/Makefile @@ -110,6 +110,7 @@ C_SOURCES = \ util/u_format_table.c \ util/u_format_tests.c \ util/u_gen_mipmap.c \ + util/u_half.c \ util/u_handle_table.c \ util/u_hash_table.c \ util/u_hash.c \ @@ -138,6 +139,9 @@ C_SOURCES = \ #vl/vl_csc.c \ #vl/vl_shader_build.c \ +CPP_SOURCES = \ + util/u_gctors.cpp + GALLIVM_SOURCES = \ gallivm/lp_bld_alpha.c \ gallivm/lp_bld_arit.c \ -- cgit v1.2.3