@@ -337,8 +337,9 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
337
337
// Create an ImageView that can actually be used by shaders (@see ICPUImageView)
338
338
inline core::smart_refctd_ptr<IGPUImageView> createImageView (IGPUImageView::SCreationParams&& params)
339
339
{
340
- if (!params.image ->wasCreatedBy (this )) {
341
- m_logger.log (" Invalid image was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
340
+ if (!params.image ->wasCreatedBy (this ))
341
+ {
342
+ m_logger.log (" The image was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
342
343
return nullptr ;
343
344
}
344
345
// TODO: @Cyprian validation of params against the device's limits (sample counts, etc.) see vkCreateImage
@@ -646,20 +647,24 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
646
647
core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout2=nullptr , core::smart_refctd_ptr<IGPUDescriptorSetLayout>&& _layout3=nullptr
647
648
)
648
649
{
649
- if ((_layout0 && !_layout0->wasCreatedBy (this ))) {
650
- m_logger.log (" Invalid layout was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
650
+ if ((_layout0 && !_layout0->wasCreatedBy (this )))
651
+ {
652
+ m_logger.log (" layout was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
651
653
return nullptr ;
652
654
}
653
- if (_layout1 && !_layout1->wasCreatedBy (this )) {
654
- m_logger.log (" Invalid layout was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
655
+ if (_layout1 && !_layout1->wasCreatedBy (this ))
656
+ {
657
+ m_logger.log (" layout was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
655
658
return nullptr ;
656
659
}
657
- if (_layout2 && !_layout2->wasCreatedBy (this )) {
658
- m_logger.log (" Invalid layout was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
660
+ if (_layout2 && !_layout2->wasCreatedBy (this ))
661
+ {
662
+ m_logger.log (" layout was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
659
663
return nullptr ;
660
664
}
661
- if (_layout3 && !_layout3->wasCreatedBy (this )) {
662
- m_logger.log (" Invalid layout was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
665
+ if (_layout3 && !_layout3->wasCreatedBy (this ))
666
+ {
667
+ m_logger.log (" layout was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
663
668
return nullptr ;
664
669
}
665
670
// sanity check
@@ -755,8 +760,9 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
755
760
return nullptr ;
756
761
}
757
762
758
- if (!params.renderpass ->wasCreatedBy (this )) {
759
- m_logger.log (" Invalid renderpass was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
763
+ if (!params.renderpass ->wasCreatedBy (this ))
764
+ {
765
+ m_logger.log (" The renderpass was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
760
766
return nullptr ;
761
767
}
762
768
@@ -816,7 +822,7 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
816
822
{
817
823
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPipelineShaderStageCreateInfo.html#VUID-VkPipelineShaderStageCreateInfo-stage-08771
818
824
if (!info.shader ->wasCreatedBy (this )) {
819
- m_logger.log (" Invalid shader was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
825
+ m_logger.log (" The shader was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
820
826
return false ;
821
827
}
822
828
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPipelineShaderStageCreateInfo.html#VUID-VkPipelineShaderStageCreateInfo-pNext-02755
@@ -883,7 +889,7 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
883
889
inline bool getQueryPoolResults (const IQueryPool* const queryPool, const uint32_t firstQuery, const uint32_t queryCount, void * const pData, const size_t stride, const core::bitflag<IQueryPool::RESULTS_FLAGS> flags)
884
890
{
885
891
if (!queryPool || !queryPool->wasCreatedBy (this )) {
886
- m_logger.log (" Invalid query pool was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
892
+ m_logger.log (" The queryPool was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
887
893
return false ;
888
894
}
889
895
if (firstQuery + queryCount >= queryPool->getCreationParameters ().queryCount ) {
@@ -1030,7 +1036,7 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
1030
1036
inline CreationParams::SSpecializationValidationResult commonCreatePipelines (IGPUPipelineCache* const pipelineCache, const std::span<const CreationParams> params, ExtraLambda&& extra)
1031
1037
{
1032
1038
if (pipelineCache && !pipelineCache->wasCreatedBy (this )) {
1033
- m_logger.log (" Invalid pipelineCache was given [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
1039
+ m_logger.log (" The pipelineCache was not created by this device [%s - %s:%d]" , system::ILogger::ELL_ERROR, __FUNCTION__, __FILE__, __LINE__);
1034
1040
return {};
1035
1041
}
1036
1042
if (params.empty ()) {
@@ -1050,7 +1056,7 @@ class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMe
1050
1056
}
1051
1057
1052
1058
if (!ci.layout ->wasCreatedBy (this )) {
1053
- m_logger.log (" Invalid layout was given (params[%d]) [%s - %s:%d]" , system::ILogger::ELL_ERROR, i, __FUNCTION__, __FILE__, __LINE__);
1059
+ m_logger.log (" The layout was not created by this device (params[%d]) [%s - %s:%d]" , system::ILogger::ELL_ERROR, i, __FUNCTION__, __FILE__, __LINE__);
1054
1060
return {};
1055
1061
}
1056
1062
0 commit comments