Lines Matching defs:device

66 radv_is_cache_disabled(struct radv_device *device)
71 return (device->instance->debug_flags & RADV_DEBUG_NO_CACHE) ||
72 (device->physical_device->use_llvm ? 0 : aco_get_codegen_flags());
76 radv_pipeline_cache_init(struct radv_pipeline_cache *cache, struct radv_device *device)
78 vk_object_base_init(&device->vk, &cache->base, VK_OBJECT_TYPE_PIPELINE_CACHE);
80 cache->device = device;
94 if (cache->hash_table == NULL || radv_is_cache_disabled(device))
107 radv_shader_destroy(cache->device, cache->hash_table[i]->shaders[j]);
110 radv_pipeline_slab_destroy(cache->device, cache->hash_table[i]->slab);
314 struct radv_device *device, struct radv_pipeline_cache *cache, const unsigned char *sha1,
322 cache = device->mem_cache;
336 if (radv_is_cache_disabled(device) || !device->physical_device->disk_cache) {
342 disk_cache_compute_key(device->physical_device->disk_cache, sha1, 20, disk_sha1);
345 (struct cache_entry *)disk_cache_get(device->physical_device->disk_cache, disk_sha1, NULL);
363 if (!(device->instance->debug_flags & RADV_DEBUG_NO_MEMORY_CACHE) ||
364 cache != device->mem_cache)
379 entry->shaders[i] = radv_shader_create(device, binary, false, true, NULL);
399 result = radv_upload_shaders(device, pipeline, binaries, gs_copy_binary);
430 if (device->instance->debug_flags & RADV_DEBUG_NO_MEMORY_CACHE && cache == device->mem_cache)
445 radv_pipeline_cache_insert_shaders(struct radv_device *device, struct radv_pipeline_cache *cache,
452 cache = device->mem_cache;
461 radv_shader_destroy(cache->device, pipeline->shaders[i]);
467 radv_pipeline_slab_destroy(cache->device, pipeline->slab);
479 if (radv_is_cache_disabled(device)) {
529 if (device->physical_device->disk_cache && cache != &device->meta_state.cache) {
531 disk_cache_compute_key(device->physical_device->disk_cache, sha1, 20, disk_sha1);
533 disk_cache_put(device->physical_device->disk_cache, disk_sha1, entry, entry_size(entry),
537 if (device->instance->debug_flags & RADV_DEBUG_NO_MEMORY_CACHE && cache == device->mem_cache) {
567 struct radv_device *device = cache->device;
579 if (header.device_id != device->physical_device->rad_info.pci_id)
581 if (memcmp(header.uuid, device->physical_device->cache_uuid, VK_UUID_SIZE) != 0)
612 RADV_FROM_HANDLE(radv_device, device, _device);
617 cache = vk_alloc2(&device->vk.alloc, pAllocator, sizeof(*cache), 8,
620 return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
625 cache->alloc = device->vk.alloc;
627 radv_pipeline_cache_init(cache, device);
643 RADV_FROM_HANDLE(radv_device, device, _device);
650 vk_free2(&device->vk.alloc, pAllocator, cache);
656 RADV_FROM_HANDLE(radv_device, device, _device);
679 header->device_id = device->physical_device->rad_info.pci_id;
680 memcpy(header->uuid, device->physical_device->cache_uuid, VK_UUID_SIZE);