We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 994158b commit 3d955bdCopy full SHA for 3d955bd
1 file changed
Graphics/GraphicsTools/src/VertexPool.cpp
@@ -191,8 +191,9 @@ class VertexPoolImpl final : public ObjectBase<IVertexPool>
191
192
DynBuffCI.VirtualSize = m_MaxVertexCount != 0 ?
193
Uint64{m_MaxVertexCount} * Uint64{VtxElem.Size} :
194
- // Use 2GB as the default virtual size
195
- Uint64{2} << Uint64{30};
+ // Use 2GB as the default virtual size, but reserve at least 1 MB for alignment.
+ // Resources above 2GB don't work in Direct3D11 (even though there are no errors).
196
+ (Uint64{2} << Uint64{30}) - AlignUp(DynBuffCI.MemoryPageSize, 1u << 20u);
197
198
m_Buffers.emplace_back(std::make_unique<DynamicBuffer>(pDevice, DynBuffCI));
199
if (!m_Buffers.back())
0 commit comments