@@ -77,6 +77,7 @@ namespace nbl::asset::material_compiler3
7777// polygonization. Using PN-Triangles/displacement would be the optimal solution here.
7878class CFrontendIR final : public CNodePool
7979{
80+ using block_allocator_type = CNodePool::obj_pool_type::block_allocator_type;
8081 template <typename T>
8182 using _typed_pointer_type = CNodePool::obj_pool_type::mem_pool_type::typed_pointer_type<T>;
8283
@@ -124,7 +125,7 @@ class CFrontendIR final : public CNodePool
124125 }
125126 inline bool operator ==(const SParameter& other) const {return !operator !=(other);}
126127
127- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const ;
128+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const ;
128129
129130 // at this stage we store the multipliers in highest precision
130131 float scale = std::numeric_limits<float >::infinity();
@@ -435,8 +436,8 @@ class CFrontendIR final : public CNodePool
435436 return false ;
436437 }
437438
438- NBL_API core::string getLabelSuffix () const override ;
439- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
439+ NBL_API2 core::string getLabelSuffix () const override ;
440+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
440441
441442 private:
442443 SCreationParams<1 >* pWonky () {return reinterpret_cast <SCreationParams<1 >*>(this +1 );}
@@ -517,8 +518,8 @@ class CFrontendIR final : public CNodePool
517518
518519 protected:
519520 inline typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override {return {};}
520- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
521- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
521+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
522+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
522523 };
523524 // ! Special nodes meant to be used as `CMul::rhs`, their behaviour depends on the IContributor in its MUL node relative subgraph.
524525 // ! If you use a different contributor node type or normal for shading, these nodes get split and duplicated into two in our Final IR.
@@ -551,7 +552,7 @@ class CFrontendIR final : public CNodePool
551552 inline typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override {return perpTransmittance;}
552553
553554 inline std::string_view getChildName_impl (const uint8_t ix) const override {return " Perpendicular\\ nTransmittance" ;}
554- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
555+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
555556 };
556557 // The "oriented" in the Etas means from frontface to backface, so there's no need to reciprocate them when creating matching BTDF for BRDF
557558 // @kept_secret TODO: Thin Film Interference Fresnel
@@ -572,9 +573,9 @@ class CFrontendIR final : public CNodePool
572573
573574 protected:
574575 inline typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override {return ix ? orientedImagEta:orientedRealEta;}
575- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
576+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
576577 inline std::string_view getChildName_impl (const uint8_t ix) const override {return ix ? " Real" :" Imaginary" ;}
577- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
578+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
578579 };
579580 // Compute Inifinite Scatter and extinction between two parallel infinite planes.
580581 // It's a specialization of what would be a layer of two identical smooth BRDF and BTDF with arbitrary Fresnel function and beer's
@@ -595,7 +596,7 @@ class CFrontendIR final : public CNodePool
595596 {
596597 protected:
597598 inline typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override final {return ix ? (ix>1 ? reflectanceBottom:extinction):reflectanceTop;}
598- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
599+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
599600
600601 inline std::string_view getChildName_impl (const uint8_t ix) const override {return ix ? (ix>1 ? " reflectanceBottom" :" extinction" ):" reflectanceTop" ;}
601602
@@ -649,7 +650,7 @@ class CFrontendIR final : public CNodePool
649650 // whether the derivative map and roughness is constant regardless of UV-space texture stretching
650651 inline bool stretchInvariant () const {return !(abs (hlsl::determinant (reference))>std::numeric_limits<float >::min ());}
651652
652- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const ;
653+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const ;
653654
654655 // Ignored if not invertible, otherwise its the reference "stretch" (UV derivatives) at which identity roughness and normalmapping occurs
655656 hlsl::float32_t2x2 reference = hlsl::float32_t2x2(0 ,0 ,0 ,0 );
@@ -687,8 +688,8 @@ class CFrontendIR final : public CNodePool
687688
688689 protected:
689690 inline _typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override {return {};}
690- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
691- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
691+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
692+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
692693 };
693694 // Supports anisotropy for all models
694695 class CCookTorrance final : public IBxDF
@@ -717,11 +718,11 @@ class CFrontendIR final : public CNodePool
717718
718719 protected:
719720 inline typed_pointer_type<IExprNode> getChildHandle_impl (const uint8_t ix) const override {return orientedRealEta;}
720- NBL_API bool invalid (const SInvalidCheckArgs& args) const override ;
721+ NBL_API2 bool invalid (const SInvalidCheckArgs& args) const override ;
721722
722723 inline core::string getLabelSuffix () const override {return ndf!=NDF::GGX ? " \\ nNDF = Beckmann" :" \\ nNDF = GGX" ;}
723724 inline std::string_view getChildName_impl (const uint8_t ix) const override {return " Oriented η" ;}
724- NBL_API void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
725+ NBL_API2 void printDot (std::ostringstream& sstr, const core::string& selfID) const override ;
725726 };
726727#undef TYPE_NAME_STR
727728
@@ -740,16 +741,16 @@ class CFrontendIR final : public CNodePool
740741 }
741742
742743 // To quickly make a matching backface material from a frontface or vice versa
743- NBL_API typed_pointer_type<IExprNode> reciprocate (const typed_pointer_type<const IExprNode> other);
744- NBL_API typed_pointer_type<CFresnel> createNamedFresnel (const std::string_view name);
744+ NBL_API2 typed_pointer_type<IExprNode> reciprocate (const typed_pointer_type<const IExprNode> other);
745+ NBL_API2 typed_pointer_type<CFresnel> createNamedFresnel (const std::string_view name);
745746
746747 // IMPORTANT: Two BxDFs are not allowed to be multiplied together.
747748 // NOTE: Right now all Spectral Variables are required to be Monochrome or 3 bucket fixed semantics, all the same wavelength.
748749 // Some things we can't check such as the compatibility of the BTDF with the BRDF (matching indices of refraction, etc.)
749750 bool valid (const typed_pointer_type<const CLayer> rootHandle, system::logger_opt_ptr logger) const ;
750751
751752 // For Debug Visualization (TODO: refactor to allow printing invalid nodes not in the `m_rootNodes` -> `printDotTree(std::ostringstream&,typed_pointer_type<const INode>)`)
752- NBL_API void printDotGraph (std::ostringstream& str) const ;
753+ NBL_API2 void printDotGraph (std::ostringstream& str) const ;
753754 inline core::string printDotGraph () const
754755 {
755756 std::ostringstream tmp;
0 commit comments