Skip to content

Commit ad22fa0

Browse files
DynamicBuffer: fix non-sparse buffer initialization
1 parent e5af4ac commit ad22fa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Graphics/GraphicsTools/src/DynamicBuffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2024 Diligent Graphics LLC
2+
* Copyright 2019-2026 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -161,7 +161,7 @@ void DynamicBuffer::InitBuffer(IRenderDevice* pDevice)
161161
}
162162

163163
// NB: m_Desc.Usage may be changed by CreateSparseBuffer()
164-
if (m_Desc.Usage == USAGE_DEFAULT && m_PendingSize > 0)
164+
if (m_Desc.Usage != USAGE_SPARSE && m_PendingSize > 0)
165165
{
166166
BufferDesc Desc = m_Desc;
167167
Desc.Size = m_PendingSize;

0 commit comments

Comments
 (0)