Many GLSL programs use macros
#ifdef
#else
#endif
to solve different configurations, is there some elegant method to solve this issue when vulkan build pipeline layout and descriptor set?
Using normal if()\else()
blocks and Vulkan specialization constants should solve this one for most cases. I'd expect any sensible compiler to optimize out an entire if()
basic block if the specialization constant is zero at compile time.