summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-10-30 11:43:53 -0500
committerJason Ekstrand <[email protected]>2019-10-31 13:46:09 +0000
commit9076e9f3751341063679eb227116060070549a37 (patch)
treef294b109bb9b54e82b6b3c5ac36c8858eb83bfca /src
parent5c664dff7593959d43f89d3fadcc148303134675 (diff)
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: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/tests/block_pool_grow_first.c6
-rw-r--r--src/intel/vulkan/tests/block_pool_no_free.c2
-rw-r--r--src/intel/vulkan/tests/state_pool.c2
-rw-r--r--src/intel/vulkan/tests/state_pool_free_list_only.c2
-rw-r--r--src/intel/vulkan/tests/state_pool_no_free.c2
-rw-r--r--src/intel/vulkan/tests/state_pool_padding.c6
6 files changed, 14 insertions, 6 deletions
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,
};