https://bugs.winehq.org/show_bug.cgi?id=39057
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #14 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to swswine from comment #13)
Thank you very much for clarification.
I will get back to this and try implementing this patch through uniform buffer objects within a couple of weeks when I have more time.
Regarding software & H/W vertex processing, the games I've seen using indexed vertex blending (IVB) had configuration option to choose between software and hardware vertex processing, but IVB was used in both modes. I had MaxVertexBlendMatrixIndex constantly set to 0 initially in my patched wined3d (updated this field setting in the patch later), this was ignored by these games, they used as much VB matrices they wanted without any error. So is it possible that at least some (or many) Windows drivers advertise 0 matrices in H/W mode but actually support up to 256 if requested? If yes, should not wine d3dx9 just do the same: just support IVB with 256 matrices in H/W mode (and in software mode when it is in place) but advertise 0 in H/W mode (or let this value to be configured)?
If that's the case, yes. Notice that the game might create the device with D3DCREATE_MIXED_VERTEXPROCESSING when the "hardware" mode is selected (you can check that from a +d3d9 trace). Ultimately this needs tests to figure out what exactly is supported in every vertex processing mode.
BTW I came across similar issue with number of supported uniforms in HLSL shader. DX9 advertises max of 256 uniforms. I came through some games failing to compile HLSL vertex shader under wine due to excessive number of uniforms they were trying to use. I worked that around by simply increasing the constant for max number of uniforms in wine d3d9, it worked. Apparently these games work on Windows which means that Windows drivers do support bigger number of uniforms per HLSL shader while advertising 256. Should not wine do the same: advertise 256 but allow up to the limit actually supported by underlying GL driver?
That should only happen with the so-called "software vertex shaders" i.e. https://msdn.microsoft.com/en-us/library/windows/desktop/bb147365%28v=vs.85%... , which AFAIK are also only supported with SOFTWARE or MIXED vertex processing. I think those should also be implemented via GLSL + UBOs but that's probably quite a bit harder than the related fixed function stuff (i.e. indexed vertex blending) in current wined3d.
Notice that I don't want to discourage you (far from it ;) and your work on this is very much appreciated.