Skip to content

Commit 71774c0

Browse files
committed
fix code
1 parent 16c74f6 commit 71774c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/nbl/video/ILogicalDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
131131
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier2-offset-01189
132132
const size_t remain = range.size!=IGPUCommandBuffer::SBufferMemoryBarrier<ResourceBarrier>{}.range.size ? range.size:1ull;
133133
if (range.offset+remain>range.buffer->getSize())
134+
{
134135
m_logger.log("Invalid range was specified [%s - %s:%d]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
135136
return false;
137+
}
136138

137139
if constexpr(std::is_same_v<IGPUCommandBuffer::SOwnershipTransferBarrier,ResourceBarrier>)
138140
return validateMemoryBarrier(queueFamilyIndex,barrier.barrier,range.buffer->getCachedCreationParams().isConcurrentSharing());

0 commit comments

Comments
 (0)