Skip to content

Commit c025bdc

Browse files
fix bug in CRAIISpanPatch
1 parent ff6ac48 commit c025bdc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/nbl/video/utilities/IUtilities.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class NBL_API2 IUtilities : public core::IReferenceCounted
496496
//! This function is an specialization of the `downloadBufferRangeViaStagingBufferAutoSubmit` function above.
497497
//! Additionally waits for the fence
498498
//! WARNING: This function blocks CPU and stalls the GPU!
499-
inline bool downloadBufferRangeViaStagingBufferAutoSubmit(const SIntendedSubmitInfo::SFrontHalf& submit,const asset::SBufferRange<IGPUBuffer>& srcBufferRange, void* data)
499+
inline bool downloadBufferRangeViaStagingBufferAutoSubmit(const SIntendedSubmitInfo::SFrontHalf& submit, const asset::SBufferRange<IGPUBuffer>& srcBufferRange, void* data)
500500
{
501501
if (!autoSubmitAndBlock(submit,[&](SIntendedSubmitInfo& nextSubmit){return downloadBufferRangeViaStagingBuffer(default_data_consumption_callback_t(data),nextSubmit,srcBufferRange);}))
502502
return false;

include/nbl/video/utilities/SIntendedSubmitInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ struct SIntendedSubmitInfo final
9999
inline CRAIISpanPatch& operator=(CRAIISpanPatch&& rhs)
100100
{
101101
commandBuffersStorage = std::move(rhs.commandBuffersStorage);
102+
std::swap(toNullify,rhs.toNullify);
103+
std::swap(m_recordingCommandBuffer,rhs.m_recordingCommandBuffer);
102104
return *this;
103105
}
104106

0 commit comments

Comments
 (0)