Browse Source

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 <lionel.g.landwerlin@intel.com>
merge-requests/2478/head
Jason Ekstrand 5 years ago
parent
commit
9076e9f375

+ 5
- 1
src/intel/vulkan/tests/block_pool_grow_first.c View File

@@ -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,
};

+ 1
- 1
src/intel/vulkan/tests/block_pool_no_free.c View File

@@ -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,
};

+ 1
- 1
src/intel/vulkan/tests/state_pool.c View File

@@ -36,7 +36,7 @@

int main(int argc, char **argv)
{
struct anv_instance instance;
struct anv_instance instance = { };
struct anv_device device = {
.instance = &instance,
};

+ 1
- 1
src/intel/vulkan/tests/state_pool_free_list_only.c View File

@@ -35,7 +35,7 @@

int main(int argc, char **argv)
{
struct anv_instance instance;
struct anv_instance instance = { };
struct anv_device device = {
.instance = &instance,
};

+ 1
- 1
src/intel/vulkan/tests/state_pool_no_free.c View File

@@ -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,
};

+ 5
- 1
src/intel/vulkan/tests/state_pool_padding.c View File

@@ -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,
};

Loading…
Cancel
Save