11
11
#include " nbl/video/IGPUCommandPool.h"
12
12
#include " nbl/video/IQueue.h"
13
13
14
+ #include " git_info.h"
15
+ #define NBL_LOG_FUNCTION m_logger.log
16
+ #include " nbl/logging_macros.h"
17
+
14
18
// TODO: remove
15
19
#define VK_NO_PROTOTYPES
16
20
#include < vulkan/vulkan.h>
@@ -716,7 +720,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
716
720
return true ;
717
721
if (!buffer->getCreationParams ().usage .hasFlags (usages))
718
722
{
719
- m_logger. log (" Incorrect `IGPUBuffer` usage flags for the command!" , system::ILogger::ELL_ERROR );
723
+ NBL_LOG_ERROR (" Incorrect `IGPUBuffer` usage flags for the command!" );
720
724
return true ;
721
725
}
722
726
return false ;
@@ -727,7 +731,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
727
731
return true ;
728
732
if (binding.offset &(alignment-1 ))
729
733
{
730
- m_logger. log (" Offset %d not aligned to %d for the command!" , system::ILogger::ELL_ERROR , binding.offset , alignment);
734
+ NBL_LOG_ERROR (" Offset %d not aligned to %d for the command!" , binding.offset , alignment);
731
735
return true ;
732
736
}
733
737
return false ;
@@ -738,7 +742,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
738
742
return true ;
739
743
if ((range.size &(alignment-1 )) && range.size !=asset::SBufferRange<IGPUBuffer>::WholeBuffer)
740
744
{
741
- m_logger. log (" Size %d not aligned to %d for the command!" , system::ILogger::ELL_ERROR , range.size , alignment);
745
+ NBL_LOG_ERROR (" Size %d not aligned to %d for the command!" , range.size , alignment);
742
746
return true ;
743
747
}
744
748
return false ;
@@ -748,12 +752,12 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
748
752
{
749
753
if (!image || !this ->isCompatibleDevicewise (image))
750
754
{
751
- m_logger. log (" invalid image!" , system::ILogger::ELL_ERROR );
755
+ NBL_LOG_ERROR (" invalid image!" );
752
756
return true ;
753
757
}
754
758
if (!image->getCreationParameters ().usage .hasFlags (usages))
755
759
{
756
- m_logger. log (" Incorrect `IGPUImage` usage flags for the command!" , system::ILogger::ELL_ERROR );
760
+ NBL_LOG_ERROR (" Incorrect `IGPUImage` usage flags for the command!" );
757
761
return true ;
758
762
}
759
763
return false ;
@@ -768,7 +772,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
768
772
case IGPUImage::LAYOUT::SHARED_PRESENT:
769
773
break ;
770
774
default :
771
- m_logger. log (" invalid destination image layout!" , system::ILogger::ELL_ERROR );
775
+ NBL_LOG_ERROR (" invalid destination image layout!" );
772
776
return true ;
773
777
}
774
778
if (invalidImage (image,IGPUImage::EUF_TRANSFER_DST_BIT))
@@ -777,7 +781,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
777
781
{
778
782
if (image->getCreationParameters ().samples !=IGPUImage::E_SAMPLE_COUNT_FLAGS::ESCF_1_BIT)
779
783
{
780
- m_logger. log (" destination image sample count must be 1!" , system::ILogger::ELL_ERROR );
784
+ NBL_LOG_ERROR (" destination image sample count must be 1!" );
781
785
return true ;
782
786
}
783
787
}
@@ -792,7 +796,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
792
796
case IGPUImage::LAYOUT::SHARED_PRESENT:
793
797
break ;
794
798
default :
795
- m_logger. log (" invalid source image layout!" , system::ILogger::ELL_ERROR );
799
+ NBL_LOG_ERROR (" invalid source image layout!" );
796
800
return true ;
797
801
}
798
802
return invalidImage (image,IGPUImage::EUF_TRANSFER_SRC_BIT);
@@ -853,4 +857,5 @@ extern template bool IGPUCommandBuffer::invalidDependency(const SDependencyInfo<
853
857
854
858
}
855
859
860
+ #include " nbl/undef_logging_macros.h"
856
861
#endif
0 commit comments