Skip to content

Commit 4d303d6

Browse files
Ported Example 23, and fixed a few bugs here and there
1 parent c025bdc commit 4d303d6

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

include/nbl/video/IGPUCommandBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
667667
BOTH = OUTSIDE|INSIDE
668668
};
669669
using queue_flags_t = IQueue::FAMILY_FLAGS;
670-
bool checkStateBeforeRecording(const core::bitflag<queue_flags_t> allowedQueueFlags=queue_flags_t::NONE, const core::bitflag<RENDERPASS_SCOPE> renderpassScope=RENDERPASS_SCOPE::BOTH);
670+
bool checkStateBeforeRecording(const core::bitflag<queue_flags_t> allowedQueueFlags=~queue_flags_t::NONE, const core::bitflag<RENDERPASS_SCOPE> renderpassScope=RENDERPASS_SCOPE::BOTH);
671671

672672
template<typename ResourceBarrier>
673673
bool invalidDependency(const SDependencyInfo<ResourceBarrier>& depInfo) const;

include/nbl/video/utilities/SIntendedSubmitInfo.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct SIntendedSubmitInfo final
2828
// frees have already been latched on the scratch semaphore you must signal anyway.
2929
if (!scratch->getRecordingFlags().hasFlags(IGPUCommandBuffer::USAGE::ONE_TIME_SUBMIT_BIT))
3030
return false;
31-
if (scratch->getState()!=IGPUCommandBuffer::STATE::INITIAL)
31+
if (scratch->getState()!=IGPUCommandBuffer::STATE::RECORDING)
3232
return false;
3333
return true;
3434
}
@@ -93,7 +93,8 @@ struct SIntendedSubmitInfo final
9393
public:
9494
inline ~CRAIISpanPatch()
9595
{
96-
toNullify->commandBuffers = {};
96+
if (toNullify)
97+
toNullify->commandBuffers = {};
9798
}
9899
inline CRAIISpanPatch(CRAIISpanPatch&& other) : CRAIISpanPatch() {operator=(std::move(other));}
99100
inline CRAIISpanPatch& operator=(CRAIISpanPatch&& rhs)

0 commit comments

Comments
 (0)