https://bugs.winehq.org/show_bug.cgi?id=39578
--- Comment #10 from swswine@gmail.com --- (In reply to gamiljydcome from comment #9)
Increase D3D9_MAX_VERTEX_SHADER_CONSTANTF to 1024, wined3d still use hardware shaders, not software shaders, right?
yes. There is currently no software shader emulation in Wine. In fact, MSDN says that in DirectX it was intended for debugging purposes, but apparently some games are using it for production.
If so and patch wined3d default enable max shader numbers of video card supported, should't be avoid sufferring many d3d app's strange problem using big float constant more than 256 but wined3d lack of software impl for now?
The app behaviour most likely won't suffer from increasing the constants number above the actual limit unless app actually tries to use this excessive number of constants. Most (or all) of applications won't freely adjust the number of constants depending on the number of constants supported: developers program shaders within the limits they have. They can make two versions for bigger and smaller limits though and choose the shader based on the device capabilities reported. It is one of the reasons why just setting and advertising bigger number of constants (whether it is supported by hardware or not) than native directx does is not a good idea. Please treat this patch as a workaround that fixes some specific games, not as a long term or by any means universal fix. The fix in this form won't ever go to wine for solid reasons.
Yes, log you sent previously says that 4096 uniform float constants are supported. When you are using my IVB patch without uniform buffers support, the actual number of uniform floats used in glsl shader is >2k.
I'd like try to set D3D9_MAX_VERTEX_SHADER_CONSTANTF and vs_limits array max constants to 2048, 3072, 4096 just if hardware support and stable running without potential bug.
You can set whatever bigger number there, you will be able to see any effect only if find some application which wants to use more than 1024 constants. If you apply this patch even with given 1024 limit, you can potentially have bug with some other games which may potentially be confused by non-standard constants limit advertised in capabilities.
This can be enhanced by reporting standard values but supporting more (e. g., actual limit supported by GL, or using UBOs which have much higher limit). I will do that if Matteo will confirm that it is a way to go (switch to UBO is much more difficult though in this case).
I'd like try to test Sims2 with you new patch.
That would be interesting I think.