Blender V4.3
vk_staging_buffer.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "vk_buffer.hh"
12#include "vk_common.hh"
13
14namespace blender::gpu {
15
22 public:
26 enum class Direction {
35 };
36
37 private:
41 const VKBuffer &device_buffer_;
42
46 VKBuffer host_buffer_;
47
48 public:
49 VKStagingBuffer(const VKBuffer &device_buffer, Direction direction);
50
54 void copy_to_device(VKContext &context);
55
59 void copy_from_device(VKContext &context);
60
65 {
66 return host_buffer_;
67 }
68
74 void free();
75};
76} // namespace blender::gpu
const VKBuffer & host_buffer_get() const
void copy_from_device(VKContext &context)
VKStagingBuffer(const VKBuffer &device_buffer, Direction direction)
void copy_to_device(VKContext &context)