MCPcopy Create free account
hub / github.com/comaps/comaps / Resize

Method Resize

libs/drape/vulkan/vulkan_gpu_buffer_impl.cpp:123–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void VulkanGPUBuffer::Resize(ref_ptr<VulkanBaseContext> context, void const * data, uint32_t elementCount)
124{
125 BufferBase::Resize(elementCount);
126
127 m_objectManager = context->GetObjectManager();
128 uint32_t const sizeInBytes = GetCapacity() * GetElementSize();
129
130 m_geometryBuffer =
131 m_objectManager->CreateBuffer(VulkanMemoryManager::ResourceType::Geometry, sizeInBytes, m_batcherHash);
132 m_objectManager->Fill(m_geometryBuffer, data, sizeInBytes);
133
134 // If we have already set up data, we have to call SetDataSize.
135 if (data != nullptr)
136 SetDataSize(elementCount);
137}
138} // namespace vulkan
139
140drape_ptr<DataBufferBase> DataBuffer::CreateImplForVulkan(ref_ptr<GraphicsContext> context, void const * data,

Callers

nothing calls this directly

Calls 3

GetObjectManagerMethod · 0.80
CreateBufferMethod · 0.80
FillMethod · 0.45

Tested by

no test coverage detected