Skip to content

Commit

Permalink
Fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
godlikepanos committed Jul 22, 2024
1 parent 898ae65 commit f8bc6f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AnKi/Util/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class CString
if(len > 0)
{
[[maybe_unused]] const PtrSize charsWritten = mbstowcs(arr, m_ptr, arrSize);
ANKI_ASSERT(charsWritten == len + 1);
ANKI_ASSERT(charsWritten == len);
}
else
{
Expand Down
7 changes: 2 additions & 5 deletions Tests/Gr/GrCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ inline void commonInit(Bool validation = true)
initWindow();
ANKI_TEST_EXPECT_NO_ERR(Input::allocateSingleton().init());

Input::allocateSingleton();
ANKI_TEST_EXPECT_NO_ERR(Input::getSingleton().init());

initGrManager();
}

Expand All @@ -111,8 +108,8 @@ inline BufferPtr createBuffer(BufferUsageBit usage, ConstWeakArray<T> data, CStr
}
copyBuff->unmap();

BufferPtr buff = GrManager::getSingleton().newBuffer(
BufferInitInfo(data.getSizeInBytes(), usage | BufferUsageBit::kTransferSource, BufferMapAccessBit::kNone, name));
BufferPtr buff = GrManager::getSingleton().newBuffer(BufferInitInfo(
data.getSizeInBytes(), usage | BufferUsageBit::kTransferDestination | BufferUsageBit::kTransferSource, BufferMapAccessBit::kNone, name));

CommandBufferInitInfo cmdbInit;
cmdbInit.m_flags |= CommandBufferFlag::kSmallBatch;
Expand Down

0 comments on commit f8bc6f2

Please sign in to comment.