aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-11-18 19:20:54 +0100
committerMarek Olšák <[email protected]>2016-11-22 18:05:51 +0100
commit86514d84e0beec47c82da4888db12bf07f33cb83 (patch)
tree2ab2198b57927295425f6a409bb234e6027ccc98
parent3ef8dff865fd7365ba36b49c43b5c858d26587ed (diff)
util: import CRC32 implementation from gallium
Reviewed-by: Timothy Arceri <[email protected]>
-rw-r--r--src/gallium/auxiliary/Makefile.sources2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c2
-rw-r--r--src/util/Makefile.sources2
-rw-r--r--src/util/crc32.c (renamed from src/gallium/auxiliary/util/u_hash.c)4
-rw-r--r--src/util/crc32.h (renamed from src/gallium/auxiliary/util/u_hash.h)12
5 files changed, 11 insertions, 11 deletions
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
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
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 <[email protected]>
*/
-#ifndef U_HASH_H_
-#define U_HASH_H_
+#ifndef CRC32_H_
+#define CRC32_H_
-
-#include "pipe/p_compiler.h"
+#include <stdlib.h>
+#include <stdint.h>
#ifdef __cplusplus
@@ -52,4 +52,4 @@ util_hash_crc32(const void *data, size_t size);
}
#endif
-#endif /* U_HASH_H_ */
+#endif /* CRC32_H_ */