updated VKArrayBuffer.h
This commit is contained in:
parent
1696c27cbb
commit
7f0a786122
@ -30,10 +30,14 @@ namespace hgl
|
|||||||
buffer_usage_flags=flags;
|
buffer_usage_flags=flags;
|
||||||
|
|
||||||
{
|
{
|
||||||
const size_t unit_size=sizeof(T);
|
uint32_t unit_size=sizeof(T);
|
||||||
VKMemoryAllocator *ma=new VKMemoryAllocator(device,buffer_usage_flags);
|
VKMemoryAllocator *ma=new VKMemoryAllocator(device,buffer_usage_flags);
|
||||||
MemoryBlock *mb=new MemoryBlock(ma);
|
MemoryBlock *mb=new MemoryBlock(ma);
|
||||||
|
|
||||||
|
uint32_t align_size=ma->GetAllocUnitSize()-1; ///< this value is "min UBO Offset alignment"
|
||||||
|
|
||||||
|
unit_size=(unit_size+align_size)&(~align_size);
|
||||||
|
|
||||||
coll=new Collection(unit_size,mb);
|
coll=new Collection(unit_size,mb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,11 +107,10 @@ SET(VK_MEMORY_SOURCE ${SG_INCLUDE_PATH}/VKMemory.h
|
|||||||
${SG_INCLUDE_PATH}/VKBuffer.h
|
${SG_INCLUDE_PATH}/VKBuffer.h
|
||||||
${SG_INCLUDE_PATH}/VKVertexAttribBuffer.h
|
${SG_INCLUDE_PATH}/VKVertexAttribBuffer.h
|
||||||
${SG_INCLUDE_PATH}/VKIndexBuffer.h
|
${SG_INCLUDE_PATH}/VKIndexBuffer.h
|
||||||
# ${SG_INCLUDE_PATH}/VKArrayBuffer.h
|
${SG_INCLUDE_PATH}/VKArrayBuffer.h
|
||||||
Vulkan/VKMemory.cpp
|
Vulkan/VKMemory.cpp
|
||||||
Vulkan/VKMemoryAllocator.cpp
|
Vulkan/VKMemoryAllocator.cpp
|
||||||
Vulkan/VKBuffer.cpp
|
Vulkan/VKBuffer.cpp
|
||||||
# Vulkan/VKArrayBuffer.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
SET(VK_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
SET(VK_DEVICE_SOURCE ${SG_INCLUDE_PATH}/VKDevice.h
|
||||||
|
Loading…
x
Reference in New Issue
Block a user