ac/surface/tests: fix a random segfault in the modifier test
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10003>
This commit is contained in:
@@ -43,6 +43,9 @@ struct test_entry {
|
|||||||
|
|
||||||
/* u_vector requires power of two sizing */
|
/* u_vector requires power of two sizing */
|
||||||
char padding[8];
|
char padding[8];
|
||||||
|
#ifdef PIPE_ARCH_X86
|
||||||
|
char padding2[8];
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint64_t
|
static uint64_t
|
||||||
@@ -394,8 +397,10 @@ static void print_test_entry(const struct test_entry *e)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
STATIC_ASSERT(sizeof(struct test_entry) == 64);
|
||||||
|
|
||||||
struct u_vector test_entries;
|
struct u_vector test_entries;
|
||||||
u_vector_init(&test_entries, util_next_power_of_two(sizeof(struct test_entry)), 4096);
|
u_vector_init(&test_entries, sizeof(struct test_entry), 4096);
|
||||||
|
|
||||||
for (unsigned i = 0; i < ARRAY_SIZE(testcases); ++i) {
|
for (unsigned i = 0; i < ARRAY_SIZE(testcases); ++i) {
|
||||||
struct radeon_info info = get_radeon_info(&testcases[i]);
|
struct radeon_info info = get_radeon_info(&testcases[i]);
|
||||||
|
Reference in New Issue
Block a user