hk: Uses vk_device::mem_cache
We had our own pipeline cache field, we need to use the common field instead for VK_KHR_pipeline_binary. Signed-off-by: Mary Guillemard <mary@mary.zone> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39095>
This commit is contained in:
@@ -400,8 +400,8 @@ hk_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||||||
struct vk_pipeline_cache_create_info cache_info = {
|
struct vk_pipeline_cache_create_info cache_info = {
|
||||||
.weak_ref = true,
|
.weak_ref = true,
|
||||||
};
|
};
|
||||||
dev->mem_cache = vk_pipeline_cache_create(&dev->vk, &cache_info, NULL);
|
dev->vk.mem_cache = vk_pipeline_cache_create(&dev->vk, &cache_info, NULL);
|
||||||
if (dev->mem_cache == NULL) {
|
if (dev->vk.mem_cache == NULL) {
|
||||||
result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||||
goto fail_queues;
|
goto fail_queues;
|
||||||
}
|
}
|
||||||
@@ -443,7 +443,7 @@ hk_CreateDevice(VkPhysicalDevice physicalDevice,
|
|||||||
fail_meta:
|
fail_meta:
|
||||||
hk_device_finish_meta(dev);
|
hk_device_finish_meta(dev);
|
||||||
fail_mem_cache:
|
fail_mem_cache:
|
||||||
vk_pipeline_cache_destroy(dev->mem_cache, NULL);
|
vk_pipeline_cache_destroy(dev->vk.mem_cache, NULL);
|
||||||
fail_queues:
|
fail_queues:
|
||||||
vk_foreach_queue_safe(iter, &dev->vk) {
|
vk_foreach_queue_safe(iter, &dev->vk) {
|
||||||
struct hk_queue *queue = container_of(iter, struct hk_queue, vk);
|
struct hk_queue *queue = container_of(iter, struct hk_queue, vk);
|
||||||
@@ -487,7 +487,7 @@ hk_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
|
|||||||
hk_destroy_internal_shaders(dev, &dev->kernels, false);
|
hk_destroy_internal_shaders(dev, &dev->kernels, false);
|
||||||
hk_destroy_internal_shaders(dev, &dev->prolog_epilog, true);
|
hk_destroy_internal_shaders(dev, &dev->prolog_epilog, true);
|
||||||
|
|
||||||
vk_pipeline_cache_destroy(dev->mem_cache, NULL);
|
vk_pipeline_cache_destroy(dev->vk.mem_cache, NULL);
|
||||||
|
|
||||||
vk_foreach_queue_safe(iter, &dev->vk) {
|
vk_foreach_queue_safe(iter, &dev->vk) {
|
||||||
struct hk_queue *queue = container_of(iter, struct hk_queue, vk);
|
struct hk_queue *queue = container_of(iter, struct hk_queue, vk);
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ struct hk_device {
|
|||||||
struct hk_descriptor_table occlusion_queries;
|
struct hk_descriptor_table occlusion_queries;
|
||||||
struct hk_sampler_heap samplers;
|
struct hk_sampler_heap samplers;
|
||||||
|
|
||||||
struct vk_pipeline_cache *mem_cache;
|
|
||||||
|
|
||||||
struct vk_meta_device meta;
|
struct vk_meta_device meta;
|
||||||
struct agx_bg_eot_cache bg_eot;
|
struct agx_bg_eot_cache bg_eot;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user