Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / util / xxhash.h
index c0c8f44b600b1ae08ac15d4feca50fea5b72f10d..f7a4b40578ea8161c8cf59788ce3124dee06b427 100644 (file)
@@ -69,6 +69,15 @@ XXH64       13.8 GB/s            1.9 GB/s
 XXH32        6.8 GB/s            6.0 GB/s
 */
 
+/* Mesa leaves strict aliasing on in the compiler, and this code likes to
+ * dereference the passed in data as u32*, which means that the compiler is
+ * free to move the u32 read before the write of the struct members being
+ * hashed, and in practice it did in freedreno.  Forcing these two things
+ * prevents it.
+ */
+#define XXH_FORCE_ALIGN_CHECK 0
+#define XXH_FORCE_MEMORY_ACCESS 0
+
 #if defined (__cplusplus)
 extern "C" {
 #endif