This fixes crashes caused by
35e626bd0e59e7ce9fd97ccef66b2468c09206a4
which made us start referencing the instance in the allocators. With
this commit, the tests now happily pass again.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100877
Tested-by: Vinson Lee <vlee@freedesktop.org>
static void run_test()
{
- struct anv_device device;
+ struct anv_instance instance;
+ struct anv_device device = {
+ .instance = &instance,
+ };
struct anv_block_pool pool;
pthread_mutex_init(&device.mutex, NULL);
int main(int argc, char **argv)
{
- struct anv_device device;
+ struct anv_instance instance;
+ struct anv_device device = {
+ .instance = &instance,
+ };
struct anv_block_pool block_pool;
struct anv_state_pool state_pool;
int main(int argc, char **argv)
{
- struct anv_device device;
+ struct anv_instance instance;
+ struct anv_device device = {
+ .instance = &instance,
+ };
struct anv_block_pool block_pool;
struct anv_state_pool state_pool;
static void run_test()
{
- struct anv_device device;
+ struct anv_instance instance;
+ struct anv_device device = {
+ .instance = &instance,
+ };
struct anv_block_pool block_pool;
struct anv_state_pool state_pool;