fix: buffer allocator

This commit is contained in:
Samuliak 2024-08-03 15:01:52 +02:00
parent 406a85672d
commit fe3b84b4a7
4 changed files with 17 additions and 17 deletions

View file

@ -41,7 +41,7 @@ public:
return m_buffers[bufferIndex];
}
MetalBufferAllocation GetBufferAllocation(size_t size);
MetalBufferAllocation GetBufferAllocation(size_t size, size_t alignment);
private:
class MetalRenderer* m_mtlr;
@ -68,9 +68,9 @@ public:
return m_bufferAllocator/*s[bufferAllocatorIndex]*/.GetBuffer(bufferIndex);
}
MetalBufferAllocation GetBufferAllocation(size_t size)
MetalBufferAllocation GetBufferAllocation(size_t size, size_t alignment)
{
auto allocation = m_bufferAllocator/*s[m_bufferAllocatorIndex]*/.GetBufferAllocation(size);
auto allocation = m_bufferAllocator/*s[m_bufferAllocatorIndex]*/.GetBufferAllocation(size, alignment);
//allocation.bufferIndex |= (m_bufferAllocatorIndex << bufferAllocatorIndexShift);
return allocation;