Skip to content

Commit c139c11

Browse files
committed
update requested logs
1 parent 5444202 commit c139c11

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

include/nbl/video/ILogicalDevice.h

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,11 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
104104
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier2-srcStageMask-03851
105105
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkImageMemoryBarrier2-srcStageMask-03854
106106
constexpr auto HostBit = asset::PIPELINE_STAGE_FLAGS::HOST_BIT;
107-
if (barrier.dep.srcStageMask.hasFlags(HostBit)||barrier.dep.dstStageMask.hasFlags(HostBit))
108-
m_logger.log("Source and destination queue family index should be equal, HOST_BIT is set [%s - %s:%p]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
107+
if (barrier.dep.srcStageMask.hasFlags(HostBit) || barrier.dep.dstStageMask.hasFlags(HostBit)) {
108+
m_logger.log("Invalid barrier, ownership transfer with host is not allowed [%s - %s:%p]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
109109
return false;
110-
// spec doesn't require it now, but we do
111-
switch (barrier.ownershipOp)
112-
{
113-
case IGPUCommandBuffer::SOwnershipTransferBarrier::OWNERSHIP_OP::ACQUIRE:
114-
if (barrier.dep.srcStageMask || barrier.dep.srcAccessMask)
115-
m_logger.log("Ownership operation ACQUIRE requires, srcStageMask and srcAccessMask being set to 0, in [%s - %s:%p]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
116-
return false;
117-
break;
118-
case IGPUCommandBuffer::SOwnershipTransferBarrier::OWNERSHIP_OP::RELEASE:
119-
if (barrier.dep.dstStageMask || barrier.dep.dstAccessMask)
120-
m_logger.log("Ownership operation RELEASE requires, dstStageMask and dstAccessMask being set to 0, in [%s - %s:%p]", system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
121-
return false;
122-
break;
123-
default:
124-
break;
125110
}
111+
126112
// Will not check because it would involve a search:
127113
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier2-srcQueueFamilyIndex-04088
128114
// https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBufferMemoryBarrier2-srcQueueFamilyIndex-04089

0 commit comments

Comments
 (0)