From 86514d84e0beec47c82da4888db12bf07f33cb83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Fri, 18 Nov 2016 19:20:54 +0100 Subject: [PATCH] util: import CRC32 implementation from gallium Reviewed-by: Timothy Arceri --- src/gallium/auxiliary/Makefile.sources | 2 -- src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +- src/util/Makefile.sources | 2 ++ .../auxiliary/util/u_hash.c => util/crc32.c} | 4 ++-- .../auxiliary/util/u_hash.h => util/crc32.h} | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) rename src/{gallium/auxiliary/util/u_hash.c => util/crc32.c} (98%) rename src/{gallium/auxiliary/util/u_hash.h => util/crc32.h} (92%) diff --git a/src/gallium/auxiliary/Makefile.sources b/src/gallium/auxiliary/Makefile.sources index 3fda2eb1733..5d4fe30e4f1 100644 --- a/src/gallium/auxiliary/Makefile.sources +++ b/src/gallium/auxiliary/Makefile.sources @@ -250,8 +250,6 @@ C_SOURCES := \ util/u_half.h \ util/u_handle_table.c \ util/u_handle_table.h \ - util/u_hash.c \ - util/u_hash.h \ util/u_hash_table.c \ util/u_hash_table.h \ util/u_helpers.c \ diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index cd4b33918ee..fd0be300650 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -32,7 +32,7 @@ #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_ureg.h" #include "util/hash_table.h" -#include "util/u_hash.h" +#include "util/crc32.h" #include "util/u_memory.h" #include "util/u_prim.h" diff --git a/src/util/Makefile.sources b/src/util/Makefile.sources index b7ca347f5e8..d2ae5e734dc 100644 --- a/src/util/Makefile.sources +++ b/src/util/Makefile.sources @@ -2,6 +2,8 @@ MESA_UTIL_FILES := \ bitscan.c \ bitscan.h \ bitset.h \ + crc32.c \ + crc32.h \ debug.c \ debug.h \ disk_cache.c \ diff --git a/src/gallium/auxiliary/util/u_hash.c b/src/util/crc32.c similarity index 98% rename from src/gallium/auxiliary/util/u_hash.c rename to src/util/crc32.c index b67653ec708..44d637c0f20 100644 --- a/src/gallium/auxiliary/util/u_hash.c +++ b/src/util/crc32.c @@ -27,13 +27,13 @@ /** * @file - * Hash functions implementation. + * CRC32 implementation. * * @author Jose Fonseca */ -#include "u_hash.h" +#include "crc32.h" static const uint32_t diff --git a/src/gallium/auxiliary/util/u_hash.h b/src/util/crc32.h similarity index 92% rename from src/gallium/auxiliary/util/u_hash.h rename to src/util/crc32.h index 8d92b07c85e..b6a21f41705 100644 --- a/src/gallium/auxiliary/util/u_hash.h +++ b/src/util/crc32.h @@ -27,16 +27,16 @@ /** * @file - * Hash functions. + * CRC32 function. * * @author Jose Fonseca */ -#ifndef U_HASH_H_ -#define U_HASH_H_ +#ifndef CRC32_H_ +#define CRC32_H_ - -#include "pipe/p_compiler.h" +#include +#include #ifdef __cplusplus @@ -52,4 +52,4 @@ util_hash_crc32(const void *data, size_t size); } #endif -#endif /* U_HASH_H_ */ +#endif /* CRC32_H_ */ -- 2.30.2