[PATCH] d3d9/tests: Add a visual test of geometry blending

Paul TBBle Hampson Paul.Hampson at Pobox.com
Mon Jan 12 06:54:36 CST 2009


The attached patch implements a test case for geometry blending,
or multi-matrix vertex blending (depending on where you look in MSDN)
when support for it is claimed, ie checking MaxVertexBlendMatrices.

I've only tested it on Windows XP which claims the support, and under
Wine both when it doesn't claim the support, and by patching Wine to
claim the support. It fails in the latter case. It'd be handy if
possible to test this with Wine when it does claim support, although
that's pretty unusual, requiring a card offering support for
GL_ARB_vertex_blend at the moment.

Although actual users of this functionality are thin on the ground, D3DX
offers two functions (ID3DXSkinInfo::ConvertToBlendedMesh and
ID3DXSkinInfo::ConvertToIndexedBlendedMesh) which change behaviour based
on claimed support for this feature, producing unexpected results if
geometry blending is unsupported.

Both of those functions have a warning "This method does not run on
hardware that does not support fixed-function vertex blending." in MSDN,
but do not actually return failure codes when called in such case, just
vertex buffers with oddly large and unrecognised-by-Wine's-D3D vertex
elements embedded. It's entirely possible something in the MS D3D
implementation would recognise and handle those vertex elements, but for
now they're useless.

Making this test pass (rather than skip) in Wine would fix programs such
as Everquest and Warhammer Online which use ConvertToBlendedMesh or
ConvertToIndexedBlendedMesh but do not then attempt to actually render
with the fixed-function pipeline using D3DRS_VERTEXBLEND.

Possible problems with this patch include the use of "geometry blending"
where "multi-matrix vertex blending" may be preferred, and the fact that
it only works for 4-or-more MaxVertexBlendMatrices support. This latter
one isn't a practical problem as as far as I can tell, everything
reports either 0 or 4 for this value, presumably because everything
implements it either in software or shaders, since the actual hardware
that performed this operation (early Radeon models) was very briefly
lived.

-- 
Paul "TBBle" Hampson, Paul.Hampson at Pobox.com

Shorter .sig for a more eco-friendly paperless office.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d3d9-tests-Add-a-visual-test-of-geometry-blending.patch
Type: text/x-diff
Size: 9935 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090112/935d5f71/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20090112/935d5f71/attachment.pgp 


More information about the wine-patches mailing list