Debian Codegraph @

src/panfrost/vulkan/panvk_precomp_cache.h

raw
1 /*
2 * Copyright © 2024 Collabora Ltd.
3 * SPDX-License-Identifier: MIT
4 */
5
6 #ifndef PANVK_PRECOMP_CACHE_H
7 #define PANVK_PRECOMP_CACHE_H
8
9 #include "panvk_device.h"
10 #ifndef PAN_ARCH
11 #error "PAN_ARCH must be defined"
12 #endif
13
14 #include "genxml/gen_macros.h"
15 #include "util/simple_mtx.h"
16 #include "libpan_dgc.h"
17 #include "libpan_shaders.h"
18 #include "pan_shader.h"
19 #include "panvk_macros.h"
20 #include "panvk_mempool.h"
21 #include "panvk_shader.h"
22
23 struct panvk_device;
24
25 struct panvk_precomp_cache {
26 simple_mtx_t lock;
27 struct panvk_device *dev;
28
29 /* Precompiled binary table */
30 const uint32_t **programs;
31
32 struct panvk_shader *precomp[LIBPAN_SHADERS_NUM_PROGRAMS];
33 };
34
35 struct panvk_precomp_cache *
36 panvk_per_arch(precomp_cache_init)(struct panvk_device *dev);
37 void panvk_per_arch(precomp_cache_cleanup)(struct panvk_precomp_cache *cache);
38
39 const struct panvk_shader_variant *
40 panvk_per_arch(precomp_cache_get)(struct panvk_precomp_cache *cache,
41 unsigned program);
42
43 #endif