1111#include " nbl/video/IGPUCommandPool.h"
1212#include " nbl/video/IQueue.h"
1313
14+ #include " git_info.h"
15+ #define NBL_LOG_FUNCTION m_logger.log
16+ #include " nbl/logging_macros.h"
17+
1418// TODO: remove
1519#define VK_NO_PROTOTYPES
1620#include < vulkan/vulkan.h>
@@ -716,7 +720,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
716720 return true ;
717721 if (!buffer->getCreationParams ().usage .hasFlags (usages))
718722 {
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!" );
720724 return true ;
721725 }
722726 return false ;
@@ -727,7 +731,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
727731 return true ;
728732 if (binding.offset &(alignment-1 ))
729733 {
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);
731735 return true ;
732736 }
733737 return false ;
@@ -738,7 +742,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
738742 return true ;
739743 if ((range.size &(alignment-1 )) && range.size !=asset::SBufferRange<IGPUBuffer>::WholeBuffer)
740744 {
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);
742746 return true ;
743747 }
744748 return false ;
@@ -748,12 +752,12 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
748752 {
749753 if (!image || !this ->isCompatibleDevicewise (image))
750754 {
751- m_logger. log (" invalid image!" , system::ILogger::ELL_ERROR );
755+ NBL_LOG_ERROR (" invalid image!" );
752756 return true ;
753757 }
754758 if (!image->getCreationParameters ().usage .hasFlags (usages))
755759 {
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!" );
757761 return true ;
758762 }
759763 return false ;
@@ -768,7 +772,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
768772 case IGPUImage::LAYOUT::SHARED_PRESENT:
769773 break ;
770774 default :
771- m_logger. log (" invalid destination image layout!" , system::ILogger::ELL_ERROR );
775+ NBL_LOG_ERROR (" invalid destination image layout!" );
772776 return true ;
773777 }
774778 if (invalidImage (image,IGPUImage::EUF_TRANSFER_DST_BIT))
@@ -777,7 +781,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
777781 {
778782 if (image->getCreationParameters ().samples !=IGPUImage::E_SAMPLE_COUNT_FLAGS::ESCF_1_BIT)
779783 {
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!" );
781785 return true ;
782786 }
783787 }
@@ -792,7 +796,7 @@ class NBL_API2 IGPUCommandBuffer : public IBackendObject
792796 case IGPUImage::LAYOUT::SHARED_PRESENT:
793797 break ;
794798 default :
795- m_logger. log (" invalid source image layout!" , system::ILogger::ELL_ERROR );
799+ NBL_LOG_ERROR (" invalid source image layout!" );
796800 return true ;
797801 }
798802 return invalidImage (image,IGPUImage::EUF_TRANSFER_SRC_BIT);
@@ -853,4 +857,5 @@ extern template bool IGPUCommandBuffer::invalidDependency(const SDependencyInfo<
853857
854858}
855859
860+ #include " nbl/undef_logging_macros.h"
856861#endif
0 commit comments