diff options
author | Chad Versace <[email protected]> | 2015-11-13 10:12:51 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-11-13 10:44:09 -0800 |
commit | af392916ff3856c8e606212914c1623674c49aff (patch) | |
tree | 8abef5a4055edc0f34b04c617092ce5d52369b3f /src/vulkan/anv_device.c | |
parent | a4a2ea3f79153627b631a2b1a7f3c4ac38430817 (diff) |
anv/device: Embed isl_device
Embed struct isl_device into anv_physical_device and anv_device. It
will later be used for surface layout calculations.
Diffstat (limited to 'src/vulkan/anv_device.c')
-rw-r--r-- | src/vulkan/anv_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index af27711d9a4..5d53deeb599 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -56,6 +56,7 @@ anv_physical_device_init(struct anv_physical_device *device, { VkResult result; int fd; + uint32_t gen10x; fd = open(path, O_RDWR | O_CLOEXEC); if (fd < 0) @@ -81,6 +82,10 @@ anv_physical_device_init(struct anv_physical_device *device, goto fail; } + gen10x = 10 * device->info->gen; + if (device->info->is_haswell) + gen10x += 5; + if (device->info->gen == 7 && !device->info->is_haswell && !device->info->is_baytrail) { fprintf(stderr, "WARNING: Ivy Bridge Vulkan support is incomplete\n"); @@ -128,6 +133,8 @@ anv_physical_device_init(struct anv_physical_device *device, device->compiler->shader_debug_log = compiler_debug_log; device->compiler->shader_perf_log = compiler_perf_log; + isl_device_init(&device->isl_dev, gen10x); + return VK_SUCCESS; fail: @@ -672,6 +679,7 @@ 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); |