This commit is contained in:
Martin Slachta
2026-07-18 14:31:15 +02:00
commit a04f0dc262
3343 changed files with 1140208 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
#pragma once
#include <string>
#include <volk.h>
#include <memory>
#include "GpuAllocation.h"
class Gpu;
/**
* Buffer
* Device memory suballocation with generic data inside.
*/
struct Buffer {
VkBuffer buf;
GpuAllocation allocation;
Buffer() : Buffer(VK_NULL_HANDLE, {}) {
}
Buffer(VkBuffer buffer, GpuAllocation allocation) :
buf(buffer), allocation(allocation) {
}
Buffer(const Buffer&& a) noexcept :
buf(a.buf), allocation(a.allocation) {
}
Buffer(const Buffer& a) noexcept :
buf(a.buf), allocation(a.allocation) {
}
void set_debug_name(const Gpu* gpu, const std::string& name) const;
/* disable copy */
};