Monado OpenXR Runtime
Loading...
Searching...
No Matches
render_compute_pipeline_cache.h
Go to the documentation of this file.
1// Copyright 2026, NVIDIA CORPORATION.
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief C API for specialized compute pipeline caches.
6 * @ingroup aux_render
7 */
8
9#pragma once
10
12
13#include "vk/vk_helpers.h"
14#include "xrt/xrt_results.h"
15
16#include <stddef.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#define RENDER_PIPELINE_CACHE_DECLARE(CACHE, SPEC) \
23 \
24 struct CACHE##_pipeline_cache; \
25 \
26 xrt_result_t CACHE##_pipeline_cache_create(const char *debug_name, struct CACHE##_pipeline_cache **out_cache); \
27 \
28 xrt_result_t CACHE##_pipeline_cache_init(struct CACHE##_pipeline_cache *cache, VkShaderModule shader, \
29 VkPipelineLayout layout, VkPipelineCache pipeline_cache); \
30 \
31 xrt_result_t CACHE##_pipeline_cache_get(struct CACHE##_pipeline_cache *cache, struct vk_bundle *vk, \
32 const struct SPEC *key, VkPipeline *out_pipeline); \
33 \
34 xrt_result_t CACHE##_pipeline_cache_prewarm(struct CACHE##_pipeline_cache *cache, struct vk_bundle *vk, \
35 const struct SPEC *keys, size_t key_count); \
36 \
37 void CACHE##_pipeline_cache_destroy(struct CACHE##_pipeline_cache **cache, struct vk_bundle *vk);
38
39RENDER_SHADER_SPECIALIZATION_ENTRIES(RENDER_PIPELINE_CACHE_DECLARE)
40
41#undef RENDER_PIPELINE_CACHE_DECLARE
42
43#ifdef __cplusplus
44}
45#endif
Shader specialization structs for render compute shaders.
Common Vulkan code header.
Internal result type for XRT.