Chris Robinson : d3d9: Use the correct size for D3DFVF_XYZW.
Alexandre Julliard
julliard at winehq.org
Mon Dec 29 08:47:52 CST 2008
Module: wine
Branch: master
Commit: 0bdab5f80cdf9807f659699ff62e813d1b0ebb61
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bdab5f80cdf9807f659699ff62e813d1b0ebb61
Author: Chris Robinson <chris.kcat at gmail.com>
Date: Sun Dec 28 09:57:13 2008 -0800
d3d9: Use the correct size for D3DFVF_XYZW.
---
dlls/d3d9/tests/vertexdeclaration.c | 5 +++++
dlls/d3d9/vertexdeclaration.c | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/d3d9/tests/vertexdeclaration.c b/dlls/d3d9/tests/vertexdeclaration.c
index 36d22b4..1ec8840 100644
--- a/dlls/d3d9/tests/vertexdeclaration.c
+++ b/dlls/d3d9/tests/vertexdeclaration.c
@@ -454,6 +454,11 @@ static void test_fvf_decl_conversion(IDirect3DDevice9 *pDevice)
}
{
CONST D3DVERTEXELEMENT9 test_buffer[] =
+ { { 0, 0, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_POSITION, 0 }, D3DDECL_END() };
+ VDECL_CHECK(test_fvf_to_decl(pDevice, default_decl, D3DFVF_XYZW, test_buffer, 1));
+ }
+ {
+ CONST D3DVERTEXELEMENT9 test_buffer[] =
{ { 0, 0, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_POSITIONT, 0 }, D3DDECL_END() };
VDECL_CHECK(test_fvf_to_decl(pDevice, default_decl, D3DFVF_XYZRHW, test_buffer, 1));
}
diff --git a/dlls/d3d9/vertexdeclaration.c b/dlls/d3d9/vertexdeclaration.c
index 4631248..86403fd 100644
--- a/dlls/d3d9/vertexdeclaration.c
+++ b/dlls/d3d9/vertexdeclaration.c
@@ -96,6 +96,10 @@ HRESULT vdecl_convert_fvf(
elements[idx].Type = D3DDECLTYPE_FLOAT4;
elements[idx].Usage = D3DDECLUSAGE_POSITIONT;
}
+ else if (!has_blend && (fvf & D3DFVF_XYZW) == D3DFVF_XYZW) {
+ elements[idx].Type = D3DDECLTYPE_FLOAT4;
+ elements[idx].Usage = D3DDECLUSAGE_POSITION;
+ }
else {
elements[idx].Type = D3DDECLTYPE_FLOAT3;
elements[idx].Usage = D3DDECLUSAGE_POSITION;
More information about the wine-cvs
mailing list