diff options
Diffstat (limited to 'src/intel/vulkan/anv_pipeline_cache.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline_cache.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_pipeline_cache.c b/src/intel/vulkan/anv_pipeline_cache.c index 5262753f725..2bc64f5bdd1 100644 --- a/src/intel/vulkan/anv_pipeline_cache.c +++ b/src/intel/vulkan/anv_pipeline_cache.c @@ -533,3 +533,37 @@ VkResult anv_MergePipelineCaches( return VK_SUCCESS; } + +struct anv_shader_bin * +anv_device_search_for_kernel(struct anv_device *device, + struct anv_pipeline_cache *cache, + const void *key_data, uint32_t key_size) +{ + return cache ? anv_pipeline_cache_search(cache, key_data, key_size) : NULL; +} + +struct anv_shader_bin * +anv_device_upload_kernel(struct anv_device *device, + struct anv_pipeline_cache *cache, + const void *key_data, uint32_t key_size, + const void *kernel_data, uint32_t kernel_size, + const void *constant_data, + uint32_t constant_data_size, + const struct brw_stage_prog_data *prog_data, + uint32_t prog_data_size, + const struct anv_pipeline_bind_map *bind_map) +{ + if (cache) { + return anv_pipeline_cache_upload_kernel(cache, key_data, key_size, + kernel_data, kernel_size, + constant_data, constant_data_size, + prog_data, prog_data_size, + bind_map); + } else { + return anv_shader_bin_create(device, key_data, key_size, + kernel_data, kernel_size, + constant_data, constant_data_size, + prog_data, prog_data_size, + prog_data->param, bind_map); + } +} |