Skip to content

Commit

Permalink
merian: fix casing on NULL_MEMEMORY_ALLOCATION_HANDLE
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Nov 4, 2024
1 parent 2644dc8 commit 8a53ceb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/merian/vk/memory/buffer_suballocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class BufferSubAllocator {
vk::DeviceSize size = 0;
vk::Buffer buffer = VK_NULL_HANDLE;
TRangeAllocator<BASE_ALIGNMENT> range;
MemoryAllocationHandle memory = NullMememoryAllocationHandle;
MemoryAllocationHandle memory = NULL_MEMEMORY_ALLOCATION_HANDLE;
uint8_t* mapping = nullptr;
vk::DeviceAddress address = 0;
bool isDedicated = false;
Expand Down
2 changes: 1 addition & 1 deletion include/merian/vk/memory/memory_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using MemoryAllocationHandle = std::shared_ptr<MemoryAllocation>;
class MemoryAllocator;
using MemoryAllocatorHandle = std::shared_ptr<MemoryAllocator>;

static const MemoryAllocationHandle NullMememoryAllocationHandle = nullptr;
static const MemoryAllocationHandle NULL_MEMEMORY_ALLOCATION_HANDLE = nullptr;

enum class MemoryMappingType {
// Memory mapping is not possible. GPU-only resources.
Expand Down
2 changes: 1 addition & 1 deletion src/merian/vk/memory/buffer_suballocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void BufferSubAllocator::freeBlock(Block& block) {
if (!block.isDedicated) {
block.range.deinit();
}
block.memory = NullMememoryAllocationHandle;
block.memory = NULL_MEMEMORY_ALLOCATION_HANDLE;
block.buffer = VK_NULL_HANDLE;
block.mapping = nullptr;
block.isDedicated = false;
Expand Down

0 comments on commit 8a53ceb

Please sign in to comment.