diff options
author | Jason Ekstrand <[email protected]> | 2015-12-28 13:26:49 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-12-28 13:29:01 -0800 |
commit | 9c84b6cce007e6ad7877c4787346b3a45ab1b0c7 (patch) | |
tree | ddd49d6dd6211224f48d9ca561e60939dcb98dc1 /src/vulkan/anv_device.c | |
parent | 763176a3e2166b2f1757582948e985d6bca9531c (diff) |
anv/device: Set device->info sooner in CreateDevice
anv_block_pool_init calls anv_block_pool_grow which checks
device->info.has_llc to see if it needs to set caching parameters.
If we don't set device->info early enough, this reads an undefined value
which is probably 0 and not what we want on llc platforms.
Found with valgrind.
Diffstat (limited to 'src/vulkan/anv_device.c')
-rw-r--r-- | src/vulkan/anv_device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 0043bea5d13..90a0061dbf8 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -706,6 +706,9 @@ VkResult anv_CreateDevice( if (device->context_id == -1) goto fail_fd; + device->info = *physical_device->info; + device->isl_dev = physical_device->isl_dev; + pthread_mutex_init(&device->mutex, NULL); anv_bo_pool_init(&device->batch_bo_pool, device, ANV_CMD_BUFFER_BATCH_SIZE); @@ -725,9 +728,6 @@ VkResult anv_CreateDevice( anv_block_pool_init(&device->scratch_block_pool, device, 0x10000); - device->info = *physical_device->info; - device->isl_dev = physical_device->isl_dev; - anv_queue_init(device, &device->queue); anv_device_init_meta(device); |