@@ -83,10 +83,10 @@ class NBL_API2 IRenderpass
8383 };
8484
8585 // The arrays pointed to by this array must be terminated by `DepthStencilAttachmentsEnd` value, which implicitly satisfies a few VUIDs
86- constexpr static inline SDepthStencilAttachmentDescription DepthStencilAttachmentsEnd = {};
86+ static const SDepthStencilAttachmentDescription DepthStencilAttachmentsEnd; // have to initialize out of line because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165
8787 const SDepthStencilAttachmentDescription* depthStencilAttachments = &DepthStencilAttachmentsEnd;
8888 // The arrays pointed to by this array must be terminated by `ColorAttachmentsEnd` value, which implicitly satisfies a few VUIDs
89- constexpr static inline SColorAttachmentDescription ColorAttachmentsEnd = {};
89+ static const SColorAttachmentDescription ColorAttachmentsEnd; // have to initialize out of line because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88165
9090 const SColorAttachmentDescription* colorAttachments = &ColorAttachmentsEnd;
9191
9292 struct SSubpassDescription final
@@ -200,7 +200,7 @@ class NBL_API2 IRenderpass
200200 SColorAttachmentsRef colorAttachments[MaxColorAttachments] = {};
201201
202202 // The arrays pointed to by this array must be terminated by `InputAttachmentsEnd` value
203- constexpr static inline SInputAttachmentRef InputAttachmentsEnd = {} ;
203+ static const SInputAttachmentRef InputAttachmentsEnd;
204204 const SInputAttachmentRef* inputAttachments = &InputAttachmentsEnd;
205205
206206 struct SPreserveAttachmentRef
@@ -233,7 +233,7 @@ class NBL_API2 IRenderpass
233233 // https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkSubpassDescription2.html#VUID-VkSubpassDescription2-pipelineBindPoint-04953
234234 // E_PIPELINE_BIND_POINT pipelineBindPoint : 2 = EPBP_GRAPHICS;
235235 };
236- constexpr static inline SSubpassDescription SubpassesEnd = {} ;
236+ static const SSubpassDescription SubpassesEnd;
237237 const SSubpassDescription* subpasses = &SubpassesEnd;
238238
239239 struct SSubpassDependency final
@@ -259,7 +259,7 @@ class NBL_API2 IRenderpass
259259 bool valid () const ;
260260 };
261261 // The arrays pointed to by this array must be terminated by `DependenciesEnd` value
262- constexpr static inline SSubpassDependency DependenciesEnd = {} ;
262+ static const SSubpassDependency DependenciesEnd;
263263 const SSubpassDependency* dependencies = &DependenciesEnd;
264264
265265
@@ -380,6 +380,12 @@ class NBL_API2 IRenderpass
380380 uint32_t m_loadOpColorAttachmentEnd = ~0u ;
381381};
382382
383+ constexpr inline IRenderpass::SCreationParams::SDepthStencilAttachmentDescription IRenderpass::SCreationParams::DepthStencilAttachmentsEnd = {};
384+ constexpr inline IRenderpass::SCreationParams::SColorAttachmentDescription IRenderpass::SCreationParams::ColorAttachmentsEnd = {};
385+ constexpr inline IRenderpass::SCreationParams::SSubpassDescription::SInputAttachmentRef IRenderpass::SCreationParams::SSubpassDescription::InputAttachmentsEnd = {};
386+ constexpr inline IRenderpass::SCreationParams::SSubpassDescription IRenderpass::SCreationParams::SubpassesEnd = {};
387+ constexpr inline IRenderpass::SCreationParams::SSubpassDependency IRenderpass::SCreationParams::DependenciesEnd = {};
388+
383389inline bool IRenderpass::compatible (const IRenderpass* other) const
384390{
385391 // If you find yourself spending a lot of time here in your profile, go ahead and implement a precomputed hash and store it in the renderpass
0 commit comments