D3D8 Software Vertex Processing

Stefan Dösinger stefandoesinger at gmail.com
Sun Aug 6 13:36:25 CDT 2017


On 06/08/17 17:19, Jan Havran wrote:
> Can I simply edit some code in Wine (some D3D flag)
> so the game will think that it use SW vertexes, so after checking some
> flags by game it will not jump into some unfinished branches for HW
> vertexes? I just want to test if it is really caused by this. From
> application view, what is difference between using SW and HW vertexes,
> do you think that using HW vertexes with code done for SW vertexes will
> work?
This behavior should already be in place. If the app requsts a software
vertex processing device and asks us for the device description later we
should report that this is a software vertex processing device. We even
do some software-like things if the app wants SWVP, like ignore
D3DLOCK_DISCARD on buffers.

The game may check some derived properties though and expect some
capability that SWVP has, but HWVP does not. The most likely case is
support for more than 256 vertex shader constants. Modern GPUs support
much more than that in OpenGL, but not in d3d8/9 on Windows. Because of
this we filter this in dlls/d3d8/device.c, d3dcaps_from_wined3dcaps().
Look for D3D8_MAX_VERTEX_SHADER_CONSTANTF at the end. It is likely that
this restriction is not in place on Windows with SWVP. You can try to
just disable this line.

Another possible culprit is fixed function vertex blending using matrix
indices. You can try to set MaxVertexBlendMatrices and
MaxVertexBlendMatrixIndex to 4 and 256 respectively (check on Windows if
those values are accurate, I might misremember them). This functionality
is unimplemented in Wine, so expect rendering problems if the game uses
this. It should be possible to implement this feature in our fixed
function replacement shader though.

The bug report doesn't have a crash dump. The similarity to windows HWVP
might mislead you. Try to compare your crash to the one of windows HWVP.
in particular, see if the crash address is the same.



More information about the wine-devel mailing list