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>
(cherry picked from commit 9076e9f375)
This commit is contained in:
Jason Ekstrand 2019-10-30 11:43:53 -05:00 committed by Dylan Baker
parent 3de8c6e8fb
commit aaba438f80
6 changed files with 14 additions and 6 deletions

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

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

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

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

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

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