We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0104a93 commit 994158bCopy full SHA for 994158b
1 file changed
Graphics/GraphicsTools/src/VertexPool.cpp
@@ -189,8 +189,10 @@ class VertexPoolImpl final : public ObjectBase<IVertexPool>
189
CreateInfo.ExtraVertexCount * VtxElem.Size :
190
static_cast<Uint32>(DynBuffCI.Desc.Size);
191
192
- // 1 GB should be enough for any use case.
193
- DynBuffCI.VirtualSize = Uint64{1} << Uint64{30};
+ DynBuffCI.VirtualSize = m_MaxVertexCount != 0 ?
+ Uint64{m_MaxVertexCount} * Uint64{VtxElem.Size} :
194
+ // Use 2GB as the default virtual size
195
+ Uint64{2} << Uint64{30};
196
197
m_Buffers.emplace_back(std::make_unique<DynamicBuffer>(pDevice, DynBuffCI));
198
if (!m_Buffers.back())
0 commit comments