From: Jason Ekstrand Date: Wed, 30 Oct 2019 16:43:53 +0000 (-0500) Subject: anv/tests: Zero-initialize instances X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9076e9f3751341063679eb227116060070549a37;p=mesa.git anv/tests: Zero-initialize instances Some of the tests were actually relying on some of those uninitialized bits to be non-zero. In particular, a couple want use_softpin = true. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/tests/block_pool_grow_first.c b/src/intel/vulkan/tests/block_pool_grow_first.c index 8c221f7300b..0738f648034 100644 --- a/src/intel/vulkan/tests/block_pool_grow_first.c +++ b/src/intel/vulkan/tests/block_pool_grow_first.c @@ -27,7 +27,11 @@ int main(int argc, char **argv) { - struct anv_instance instance; + struct anv_instance instance = { + .physicalDevice = { + .use_softpin = true, + }, + }; struct anv_device device = { .instance = &instance, }; diff --git a/src/intel/vulkan/tests/block_pool_no_free.c b/src/intel/vulkan/tests/block_pool_no_free.c index 49fda232dbd..361336a8e8e 100644 --- a/src/intel/vulkan/tests/block_pool_no_free.c +++ b/src/intel/vulkan/tests/block_pool_no_free.c @@ -111,7 +111,7 @@ static void validate_monotonic(int32_t **blocks) static void run_test() { - struct anv_instance instance; + struct anv_instance instance = { }; struct anv_device device = { .instance = &instance, }; diff --git a/src/intel/vulkan/tests/state_pool.c b/src/intel/vulkan/tests/state_pool.c index d79583e70bb..0f28afe9f5f 100644 --- a/src/intel/vulkan/tests/state_pool.c +++ b/src/intel/vulkan/tests/state_pool.c @@ -36,7 +36,7 @@ int main(int argc, char **argv) { - struct anv_instance instance; + struct anv_instance instance = { }; struct anv_device device = { .instance = &instance, }; diff --git a/src/intel/vulkan/tests/state_pool_free_list_only.c b/src/intel/vulkan/tests/state_pool_free_list_only.c index e34deba2f1a..744ccae350c 100644 --- a/src/intel/vulkan/tests/state_pool_free_list_only.c +++ b/src/intel/vulkan/tests/state_pool_free_list_only.c @@ -35,7 +35,7 @@ int main(int argc, char **argv) { - struct anv_instance instance; + struct anv_instance instance = { }; struct anv_device device = { .instance = &instance, }; diff --git a/src/intel/vulkan/tests/state_pool_no_free.c b/src/intel/vulkan/tests/state_pool_no_free.c index ae4a3c16bdc..687e52606c1 100644 --- a/src/intel/vulkan/tests/state_pool_no_free.c +++ b/src/intel/vulkan/tests/state_pool_no_free.c @@ -56,7 +56,7 @@ static void *alloc_states(void *_job) static void run_test() { - struct anv_instance instance; + struct anv_instance instance = { }; struct anv_device device = { .instance = &instance, }; diff --git a/src/intel/vulkan/tests/state_pool_padding.c b/src/intel/vulkan/tests/state_pool_padding.c index b51300a39ff..e1cec608678 100644 --- a/src/intel/vulkan/tests/state_pool_padding.c +++ b/src/intel/vulkan/tests/state_pool_padding.c @@ -27,7 +27,11 @@ int main(int argc, char **argv) { - struct anv_instance instance; + struct anv_instance instance = { + .physicalDevice = { + .use_softpin = true, + }, + }; struct anv_device device = { .instance = &instance, };