Blender V4.3
vk_pixel_buffer.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "vk_pixel_buffer.hh"
10
11#include "vk_context.hh"
12
13namespace blender::gpu {
14
16{
17 buffer_.create(size,
19 VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT,
20 true);
21 debug::object_label(buffer_.vk_handle(), "PixelBuffer");
22}
23
25{
26 /* Vulkan buffers are always mapped between allocation and freeing. */
27 return buffer_.mapped_memory_get();
28}
29
31{
32 /* Vulkan buffers are always mapped between allocation and freeing. */
33}
34
36{
37 return int64_t(buffer_.vk_handle());
38}
39
41{
42 return size_;
43}
44
45} // namespace blender::gpu
@ GPU_USAGE_STATIC
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition btDbvt.cpp:52
int64_t get_native_handle() override
void object_label(GLenum type, GLuint object, const char *name)
Definition gl_debug.cc:344
__int64 int64_t
Definition stdint.h:89