@@ -737,14 +737,20 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
737
737
if (invalidBufferBinding ({range.offset ,range.buffer },alignment,usages))
738
738
return true ;
739
739
if ((range.size &(alignment-1 )) && range.size !=asset::SBufferRange<IGPUBuffer>::WholeBuffer)
740
+ {
741
+ m_logger.log (" Size %d not aligned to %d for the command!" , system::ILogger::ELL_ERROR, range.size , alignment);
740
742
return true ;
743
+ }
741
744
return false ;
742
745
}
743
746
744
747
inline bool invalidImage (const IGPUImage* image, const IGPUImage::E_USAGE_FLAGS usages) const
745
748
{
746
749
if (!image || !this ->isCompatibleDevicewise (image))
750
+ {
751
+ m_logger.log (" invalid image!" , system::ILogger::ELL_ERROR);
747
752
return true ;
753
+ }
748
754
if (!image->getCreationParameters ().usage .hasFlags (usages))
749
755
{
750
756
m_logger.log (" Incorrect `IGPUImage` usage flags for the command!" , system::ILogger::ELL_ERROR);
@@ -762,14 +768,18 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
762
768
case IGPUImage::LAYOUT::SHARED_PRESENT:
763
769
break ;
764
770
default :
771
+ m_logger.log (" invalid destination image layout!" , system::ILogger::ELL_ERROR);
765
772
return true ;
766
773
}
767
774
if (invalidImage (image,IGPUImage::EUF_TRANSFER_DST_BIT))
768
775
return true ;
769
776
if constexpr (!clear)
770
777
{
771
778
if (image->getCreationParameters ().samples !=IGPUImage::E_SAMPLE_COUNT_FLAGS::ESCF_1_BIT)
779
+ {
780
+ m_logger.log (" destination image sample count must be 1!" , system::ILogger::ELL_ERROR);
772
781
return true ;
782
+ }
773
783
}
774
784
return false ;
775
785
}
@@ -782,6 +792,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
782
792
case IGPUImage::LAYOUT::SHARED_PRESENT:
783
793
break ;
784
794
default :
795
+ m_logger.log (" invalid source image layout!" , system::ILogger::ELL_ERROR);
785
796
return true ;
786
797
}
787
798
return invalidImage (image,IGPUImage::EUF_TRANSFER_SRC_BIT);
0 commit comments