D3D12MemoryAllocator icon indicating copy to clipboard operation
D3D12MemoryAllocator copied to clipboard

AlignUp SizeInBytes for buffer memory

Open kruseborn opened this issue 2 years ago • 0 comments

https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator/blob/7597f717c7b32b74d263009ecc15985b517585c7/src/D3D12MemAlloc.cpp#L8023

If you are using the same heap for buffers and textures, it would be possible for a "small" texture with 4kb alignment to be placed in that memory space after the buffer, if the size is not aligned up. Is there any other reason you align up the size when you allocate memory for a buffer?

Or is the intention to always use separate heaps for buffers and textures?

kruseborn avatar Oct 28 '22 08:10 kruseborn