4#include "graphics/GPUTypes.hpp"
11VK_DEFINE_HANDLE(VmaAllocation);
62 VkImageView
view = VK_NULL_HANDLE;
71 VmaAllocation
data = VK_NULL_HANDLE;
72 ImTextureID
imgui = (ImTextureID)VK_NULL_HANDLE;
74 std::vector<std::vector<VkImageLayout>>
layouts;
114 VmaAllocation
data = VK_NULL_HANDLE;
164 std::vector<VkVertexInputBindingDescription>
bindings;
General purpose GPU buffer, with different use types determining its memory type, visibility and acce...
Definition: Buffer.hpp:10
Store data in a GPU buffer.
Definition: GPUObjects.hpp:86
GPUBuffer & operator=(const GPUBuffer &)=delete
char * mapped
If the buffer is CPU-mappable, its CPU address.
Definition: GPUObjects.hpp:115
GPUBuffer(const GPUBuffer &)=delete
void clean()
Definition: GPUObjects.cpp:39
GPUBuffer & operator=(GPUBuffer &&)=delete
VmaAllocation data
Internal allocation.
Definition: GPUObjects.hpp:114
bool mappable
Is the buffer mappable on the CPU.
Definition: GPUObjects.hpp:116
GPUBuffer(GPUBuffer &&)=delete
VkBuffer buffer
Buffer native handle.
Definition: GPUObjects.hpp:113
Store vertices and triangles data on the GPU, linked by an array object.
Definition: GPUObjects.hpp:125
size_t count
The number of vertices (cached).
Definition: GPUObjects.hpp:131
bool isEquivalent(const GPUMesh &other) const
Definition: GPUObjects.cpp:57
GPUMesh(GPUMesh &&)=delete
void clean()
Definition: GPUObjects.cpp:43
GPUMesh(const GPUMesh &)=delete
std::unique_ptr< Buffer > indexBuffer
Index element buffer.
Definition: GPUObjects.hpp:129
std::unique_ptr< Buffer > vertexBuffer
Vertex data buffer.
Definition: GPUObjects.hpp:128
State state
Internal GPU layout.
Definition: GPUObjects.hpp:175
GPUMesh & operator=(const GPUMesh &)=delete
GPUMesh & operator=(GPUMesh &&)=delete
Store a texture data on the GPU.
Definition: GPUObjects.hpp:18
VkImageLayout defaultLayout
Default layout to restore to in some cases.
Definition: GPUObjects.hpp:75
GPUTexture(GPUTexture &&)=delete
void clean()
Definition: GPUObjects.cpp:20
ImTextureID imgui
ImGui compatible handle (internally a descriptor set).
Definition: GPUObjects.hpp:72
std::vector< MipViews > views
Per-mip image views.
Definition: GPUObjects.hpp:69
GPUTexture(const GPUTexture &)=delete
static bool isSRGB(const Layout &format)
Definition: GPUObjects.cpp:31
std::vector< std::vector< VkImageLayout > > layouts
Per-mip per-layer image layout.
Definition: GPUObjects.hpp:74
GPUTexture & operator=(GPUTexture &&)=delete
VkImage image
Native image handle.
Definition: GPUObjects.hpp:61
uint channels
Number of channels.
Definition: GPUObjects.hpp:59
VmaAllocation data
Internal allocation.
Definition: GPUObjects.hpp:71
VkFormat format
Texture native format.
Definition: GPUObjects.hpp:56
bool owned
Do we own our Vulkan data (not the case for swapchain images).
Definition: GPUObjects.hpp:77
VkImageAspectFlags aspect
Texture aspects.
Definition: GPUObjects.hpp:57
static unsigned int getChannelsCount(const Layout &format)
Definition: GPUObjects.cpp:26
VkImageView view
Native main image view (all mips).
Definition: GPUObjects.hpp:62
GPUTexture & operator=(const GPUTexture &)=delete
BufferType
The type of data a buffer is storing, determining its use.
Definition: GPUTypes.hpp:33
Layout
The layout of a texture: components count and type.
Definition: GPUTypes.hpp:225
Internal GPU state for pipeline compatibility.
Definition: GPUObjects.hpp:162
std::vector< VkVertexInputBindingDescription > bindings
List of bindings.
Definition: GPUObjects.hpp:164
std::vector< VkVertexInputAttributeDescription > attributes
List of attributes.
Definition: GPUObjects.hpp:163
bool isEquivalent(const State &other) const
Definition: GPUObjects.cpp:61
std::vector< VkDeviceSize > offsets
Offsets in each buffer.
Definition: GPUObjects.hpp:166
std::vector< VkBuffer > buffers
Buffers used.
Definition: GPUObjects.hpp:165
Aggregate views for each view.
Definition: GPUObjects.hpp:65
std::vector< VkImageView > views
Views covering each layer of the mip, separately.
Definition: GPUObjects.hpp:66
VkImageView mipView
View covering all layers of the mip.
Definition: GPUObjects.hpp:67