https://bugs.winehq.org/show_bug.cgi?id=41213
--- Comment #8 from Matteo Bruni matteo.mystral@gmail.com --- The point is that many of those structures should actually follow the d3d fragment samplers limit, which is 16 even for SM5 / d3d11. MAX_VERTEX_SAMPLERS instead should probably be incremented to 16 (that changed with SM4 / d3d10) but that's somewhat of a different issue.
The first step in fixing this bug (i.e. allowing for more than 16 OpenGL samplers, which aren't the same thing as d3d samplers) is to figure out which structure fields should depend on which limit. Only then deciding how to fix it makes sense, be it allocating dynamically some of those arrays (unlikely IMHO) or otherwise.