https://bugs.winehq.org/show_bug.cgi?id=41213
--- Comment #6 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to Jason Wood from comment #4)
I don't know GL or D3D, but it seems to me that this value shouldn't be hard coded.
Actually it isn't, see gl_info->limits.fragment_samplers in wined3d_adapter_init_limits(). MAX_FRAGMENT_SAMPLERS is used as an upper bound though and the reason is that there are a number of data structures and bitmasks in wined3d which are statically sized (the masks would need to be updated to account for the change, btw). In turn, some of those really shouldn't depend on the d3d max sampler count (e.g. resource_info in struct wined3d_shader_reg_maps) but on the max resource count. That's because of historical reasons i.e. the two values happened to match for d3d <= 9.
In the end, raising MAX_FRAGMENT_SAMPLERS probably isn't the correct fix for the bug, this would need more work.