Path: blob/21.2-virgl/src/gallium/drivers/lima/lima_disk_cache.h
4565 views
/*1* Copyright © 2018 Intel Corporation2* Copyright (c) 2021 Lima Project3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Software"),6* to deal in the Software without restriction, including without limitation7* the rights to use, copy, modify, merge, publish, distribute, sub license,8* and/or sell copies of the Software, and to permit persons to whom the9* Software is furnished to do so, subject to the following conditions:10*11* The above copyright notice and this permission notice (including the12* next paragraph) shall be included in all copies or substantial portions13* of the Software.14*15* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR16* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,17* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL18* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER19* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING20* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER21* DEALINGS IN THE SOFTWARE.22*23*/2425#ifndef H_LIMA_DISK_CACHE26#define H_LIMA_DISK_CACHE2728struct disk_cache;29struct lima_screen;30struct lima_vs_key;31struct lima_fs_key;32struct lima_vs_compiled_shader;33struct lima_fs_compiled_shader;3435void36lima_disk_cache_init(struct lima_screen *screen);3738struct lima_vs_compiled_shader *39lima_vs_disk_cache_retrieve(struct disk_cache *cache,40struct lima_vs_key *key);4142struct lima_fs_compiled_shader *43lima_fs_disk_cache_retrieve(struct disk_cache *cache,44struct lima_fs_key *key);4546void47lima_vs_disk_cache_store(struct disk_cache *cache,48const struct lima_vs_key *key,49const struct lima_vs_compiled_shader *shader);5051void52lima_fs_disk_cache_store(struct disk_cache *cache,53const struct lima_fs_key *key,54const struct lima_fs_compiled_shader *shader);5556#endif575859