add VKMemoryAllocator.h/.cpp in CMakeLists.txt
This commit is contained in:
parent
8f1fc82697
commit
d0d00b235c
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 91d408d10cb6f934522f6c544ae05694315b90fe
|
||||
Subproject commit ec23a526afb1543236817a930c2f8a57b0b37570
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include<hgl/graph/VKBuffer.h>
|
||||
#include<hgl/graph/VKDevice.h>
|
||||
#include<hgl/type/Collection.h>
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
@ -11,24 +12,20 @@ namespace hgl
|
||||
* GPU数据阵列缓冲区<br>
|
||||
* 它用于储存多份相同格式的数据,常用于多物件渲染,instance等
|
||||
*/
|
||||
class GPUArrayBuffer
|
||||
template<typename T> class GPUArrayBuffer
|
||||
{
|
||||
protected:
|
||||
|
||||
GPUDevice * device;
|
||||
|
||||
uint32_t item_size; ///<单个数据长度
|
||||
uint32_t alloc_count; ///<总计分配的数据个数
|
||||
uint32_t count; ///<实际使用的数据个数
|
||||
uint32_t total_bytes; ///<总字节数
|
||||
|
||||
GPUBuffer * buf_gpu; ///<实际数据GPU缓冲区
|
||||
uint8 * buf_cpu;
|
||||
uint32_t * offset; ///<数据偏移地址
|
||||
Collection<T> *coll;
|
||||
|
||||
private:
|
||||
|
||||
GPUArrayBuffer(GPUDevice *,const uint32_t s=0,const uint32_t c=0);
|
||||
GPUArrayBuffer(GPUDevice *device,const uint32_t s,const uint32_t c)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
friend class GPUDevice;
|
||||
|
||||
|
@ -101,11 +101,13 @@ SET(VK_DEBUG_SOURCE ${SG_INCLUDE_PATH}/VKDebugOut.h
|
||||
Vulkan/VKDebugOut.cpp)
|
||||
|
||||
SET(VK_MEMORY_SOURCE ${SG_INCLUDE_PATH}/VKMemory.h
|
||||
${SG_INCLUDE_PATH}/VKMemoryAllocator.h
|
||||
${SG_INCLUDE_PATH}/VKBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKVertexAttribBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKIndexBuffer.h
|
||||
${SG_INCLUDE_PATH}/VKArrayBuffer.h
|
||||
Vulkan/VKMemory.cpp
|
||||
Vulkan/VKMemoryAllocator.cpp
|
||||
Vulkan/VKBuffer.cpp
|
||||
Vulkan/VKArrayBuffer.cpp)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user