59 static_assert(std::is_trivially_copyable_v<Key>,
"Key must be a trivially-copyable POD");
72 init(VkShaderModule shader, VkPipelineLayout layout, VkPipelineCache pipelineCache);
74 XRT_CHECK_RESULT VkResult
75 get(
struct vk_bundle *vk,
const Key &key, VkPipeline &out);
77 XRT_CHECK_RESULT VkResult
78 prewarm(
struct vk_bundle *vk, std::span<const Key> keys);
87 operator()(
const Key &key)
const noexcept;
92 operator()(
const Key &a,
const Key &b)
const noexcept;
95 VkShaderModule mShader{VK_NULL_HANDLE};
96 VkPipelineLayout mLayout{VK_NULL_HANDLE};
97 VkPipelineCache mCache{VK_NULL_HANDLE};
100 std::unordered_map<Key, VkPipeline, Hash, Equal> mPipelines;
void init(VkShaderModule shader, VkPipelineLayout layout, VkPipelineCache pipelineCache)
Sets the borrowed Vulkan objects used to create pipelines.
Definition render_compute_pipeline_cache.cpp:77
A bundle of Vulkan functions and objects, used by both Compositor and Compositor client code.
Definition vk_helpers.h:81