Build mesa 6245 failed
Commit c690a7a8cd by Matt Turner on 11/23/2017 6:41 PM:
util: Fix disk_cache index calculation on big endian\n\nThe cache-test test program attempts to create a collision (using key_a\nand key_a_collide) by making the first two bytes identical. The idea is\nfine -- the shader cache wants to use the first four characters of a\nSHA1 hex digest as the index.\n\nThe following program\n\n unsigned char array[4] = {1, 2, 3, 4};\n int *ptr = (int *)array;\n\n for (int i = 0; i < 4; i++) {\n printf("%02x", array[i]);\n }\n printf("\n");\n\n printf("%08x\n", *ptr);\n\nprints\n\n 01020304\n 04030201\n\non little endian, and\n\n 01020304\n 01020304\n\non big endian.\n\nOn big endian platforms reading the character array back as an int (as\nis done in disk_cache.c) does not yield the same results as reading the\nbyte array.\n\nTo get the first four characters of the SHA1 hex digest when we mask\nwith CACHE_INDEX_KEY_MASK, we need to byte swap the int on big endian\nplatforms.\n\nBugzilla: https://bugs.freedesktop.org/103668\nBugzilla: https://bugs.gentoo.org/637060\nBugzilla: https://bugs.gentoo.org/636326\nFixes: 87ab26b2ab35 ("glsl: Add initial functions to implement an\n on-disk cache")\nReviewed-by: Emil Velikov <emil.veli...@collabora.com>
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev