Commit 0bdab5f8 authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

d3d9: Use the correct size for D3DFVF_XYZW.

parent 7f11abc9
......@@ -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));
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment