Blender
V5.3
source
blender
gpu
vulkan
vk_vertex_attribute_object_cache.hh
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2026 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#pragma once
10
11
#include "
vk_shader_interface.hh
"
12
#include "
vk_vertex_attribute_object.hh
"
13
14
namespace
blender::gpu
{
15
16
class
VKContext
;
17
class
VKBatch
;
18
29
class
VKVertexAttributeObjectCache
{
30
public
:
31
static
constexpr
int
CACHE_LEN
= 16;
32
39
const
VKVertexAttributeObject
&
get_or_create
(
VKContext
&context,
40
VKBatch
&batch,
41
VKShaderInterface::Key
shader_key,
42
VKVertexInputDescriptionPool
&pool);
43
45
void
clear
();
46
47
private
:
48
VKShaderInterface::Key
keys_[
CACHE_LEN
];
49
VKVertexAttributeObject
values_[
CACHE_LEN
];
50
int
write_index_ = 0;
51
};
52
53
}
// namespace blender::gpu
blender::gpu::ShaderInterface::Key
uint64_t Key
Definition
gpu_shader_interface.hh:53
blender::gpu::VKBatch
Definition
vk_batch.hh:19
blender::gpu::VKContext
Definition
vk_context.hh:42
blender::gpu::VKVertexAttributeObjectCache
Cache of VKVertexAttributeObjects keyed by VKShaderInterface.
Definition
vk_vertex_attribute_object_cache.hh:29
blender::gpu::VKVertexAttributeObjectCache::clear
void clear()
Definition
vk_vertex_attribute_object_cache.cc:38
blender::gpu::VKVertexAttributeObjectCache::CACHE_LEN
static constexpr int CACHE_LEN
Definition
vk_vertex_attribute_object_cache.hh:31
blender::gpu::VKVertexAttributeObjectCache::get_or_create
const VKVertexAttributeObject & get_or_create(VKContext &context, VKBatch &batch, VKShaderInterface::Key shader_key, VKVertexInputDescriptionPool &pool)
Definition
vk_vertex_attribute_object_cache.cc:16
blender::gpu::VKVertexAttributeObject
Definition
vk_vertex_attribute_object.hh:29
blender::gpu::VKVertexInputDescriptionPool
Pool with all used vertex input descriptions.
Definition
vk_vertex_input_description.hh:63
blender::gpu
Definition
blf_internal_types.hh:35
vk_shader_interface.hh
vk_vertex_attribute_object.hh
Generated on
for Blender by
doxygen
1.18.0