https://bugs.winehq.org/show_bug.cgi?id=41213
--- Comment #4 from Jason Wood sandain@hotmail.com --- I don't know GL or D3D, but it seems to me that this value shouldn't be hard coded. A little searching leads me to believe that my patch is wrong, a default value if 16 is probably correct. However, either newer versions of GL/D3D or the hardware itself supports more than 16. I think this value can be queried using GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, but I don't know GL so I might be off. If the actual number that is supported can be queried, that is probably the right way to go.