Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BufferVK.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2024 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
9
11
13class MemoryVK : public RefTarget<MemoryVK>
14{
15public:
17 {
18 // We should have unmapped and freed the block before destruction
20 JPH_ASSERT(mMemory == VK_NULL_HANDLE);
21 }
22
23 VkDeviceMemory mMemory = VK_NULL_HANDLE;
24 VkDeviceSize mSize = 0;
25 VkDeviceSize mBufferSize = 0;
26 VkMemoryPropertyFlags mProperties = 0;
27 int mMappedCount = 0;
28 void * mMappedPtr = nullptr;
29};
30
33{
34public:
36 VkBuffer mBuffer = VK_NULL_HANDLE;
37 VkDeviceSize mOffset = 0;
38 VkDeviceSize mSize = 0;
39};
40
#define JPH_NAMESPACE_END
Definition Core.h:425
#define JPH_NAMESPACE_BEGIN
Definition Core.h:419
#define JPH_ASSERT(...)
Definition IssueReporting.h:33
Simple wrapper class to manage a Vulkan buffer.
Definition BufferVK.h:33
VkBuffer mBuffer
The Vulkan buffer handle.
Definition BufferVK.h:36
VkDeviceSize mOffset
Offset in the memory block where the buffer starts.
Definition BufferVK.h:37
Ref< MemoryVK > mMemory
The memory block that contains the buffer (note that filling this in is optional if you do your own b...
Definition BufferVK.h:35
VkDeviceSize mSize
Real size of the buffer.
Definition BufferVK.h:38
Simple wrapper class to manage a Vulkan memory block.
Definition BufferVK.h:14
VkDeviceSize mBufferSize
Size of each of the buffers that this memory block has been divided into.
Definition BufferVK.h:25
int mMappedCount
How often buffers using this memory block were mapped.
Definition BufferVK.h:27
VkDeviceMemory mMemory
The Vulkan memory handle.
Definition BufferVK.h:23
VkMemoryPropertyFlags mProperties
Vulkan memory properties used to allocate this block.
Definition BufferVK.h:26
~MemoryVK()
Definition BufferVK.h:16
VkDeviceSize mSize
Size of the memory block.
Definition BufferVK.h:24
void * mMappedPtr
The CPU address of the memory block when mapped.
Definition BufferVK.h:28
Definition Reference.h:107
Definition Reference.h:35