ac/surface/tests: fix the ARM build
authorMarek Olšák <marek.olsak@amd.com>
Tue, 6 Jul 2021 17:15:12 +0000 (13:15 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 8 Jul 2021 18:37:41 +0000 (18:37 +0000)
Fixes: 8771d45a "ac/surface/tests: fix a random segfault in the modifier test"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4655

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11754>

src/amd/common/ac_surface_modifier_test.c

index 8c2f90f..91bdc8f 100644 (file)
@@ -42,10 +42,7 @@ struct test_entry {
    unsigned char hash[20];
 
    /* u_vector requires power of two sizing */
-   char padding[8];
-#ifdef PIPE_ARCH_X86
-   char padding2[8];
-#endif
+   char padding[sizeof(void*) == 8 ? 8 : 16];
 };
 
 static uint64_t