diff options
author | Jason Ekstrand <[email protected]> | 2018-06-29 17:29:35 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-07-02 13:07:06 -0700 |
commit | 76fdc8a85c630ee66902cbe8568d81fc116c1b3e (patch) | |
tree | 5c881e741fbeee407c05b39d90c1cab3f8ddfb3d /src/intel/vulkan/anv_device.c | |
parent | d1c778b362d3ccf203f33095bee2af45dc8cde9a (diff) |
anv: Use a default pipeline cache if none is specified
If a client is dumb enough to not specify a pipeline cache, give it a
default. We have to create one anyway for blorp so we may as well let
the client cache shaders in it.
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 9240cbdbe0a..2d0b23dfdae 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -604,6 +604,9 @@ VkResult anv_CreateInstance( return vk_error(result); } + instance->pipeline_cache_enabled = + env_var_as_boolean("ANV_ENABLE_PIPELINE_CACHE", true); + _mesa_locale_init(); VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false)); @@ -1728,6 +1731,8 @@ VkResult anv_CreateDevice( if (result != VK_SUCCESS) goto fail_workaround_bo; + anv_pipeline_cache_init(&device->default_pipeline_cache, device, true); + anv_device_init_blorp(device); anv_device_init_border_colors(device); @@ -1779,6 +1784,8 @@ void anv_DestroyDevice( anv_device_finish_blorp(device); + anv_pipeline_cache_finish(&device->default_pipeline_cache); + anv_queue_finish(&device->queue); #ifdef HAVE_VALGRIND |