MCPcopy Create free account
hub / github.com/crownengine/crown / alloc

Method alloc

3rdparty/bgfx/src/renderer_vk.cpp:4984–4996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4982 }
4983
4984 uint32_t StagingScratchBufferVK::alloc(uint32_t _size, uint32_t _minAlign)
4985 {
4986 const uint32_t align = bx::uint32_lcm(m_align, _minAlign);
4987 const uint32_t offset = bx::strideAlign(m_chunkPos, align);
4988
4989 if (offset + _size <= m_size)
4990 {
4991 m_chunkPos = offset + _size;
4992 return offset;
4993 }
4994
4995 return UINT32_MAX;
4996 }
4997
4998 uint32_t StagingScratchBufferVK::write(const void* _data, uint32_t _size, uint32_t _minAlign)
4999 {

Callers 7

initMethod · 0.45
beginMethod · 0.45
initMethod · 0.45
kickMethod · 0.45
recycleMethod · 0.45
addMethod · 0.45

Calls 2

getNameFunction · 0.70
reserveMethod · 0.45

Tested by

no test coverage detected