Skip to content

Commit 7913ad5

Browse files
committed
SIntendedSubmitInfo: begin and reset calls to command buffer can fail.
1 parent 8272e8c commit 7913ad5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/nbl/video/utilities/SIntendedSubmitInfo.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,10 @@ struct SIntendedSubmitInfo final : core::Uncopyable
251251
}
252252
}
253253
// could have just called begin to reset but also need to reset with the release resources flag
254-
recordingCmdBuf->cmdbuf->reset(IGPUCommandBuffer::RESET_FLAGS::RELEASE_RESOURCES_BIT);
255-
recordingCmdBuf->cmdbuf->begin(IGPUCommandBuffer::USAGE::ONE_TIME_SUBMIT_BIT);
254+
if (!recordingCmdBuf->cmdbuf->reset(IGPUCommandBuffer::RESET_FLAGS::RELEASE_RESOURCES_BIT))
255+
return false;
256+
if (!recordingCmdBuf->cmdbuf->begin(IGPUCommandBuffer::USAGE::ONE_TIME_SUBMIT_BIT))
257+
return false;
256258

257259
return true;
258260
}

0 commit comments

Comments
 (0)