Commit 5e10f1d3 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3d8: Fix stream data skip count in convert_to_wined3d_declaration().

parent 422c4fbf
......@@ -7813,13 +7813,19 @@ static void test_vshader_input(void)
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, -1.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, 0.0f, 0.1f}, 0x00ff8040},
},
};
static const struct
{
struct vec3 position;
struct vec3 dummy; /* testing D3DVSD_SKIP */
DWORD diffuse;
}
quad3_color[] =
{
{{-1.0f, 0.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 1.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 1.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 0.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{-1.0f, 1.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{ 0.0f, 1.0f, 0.1f}, {0.0f}, 0x00ff8040},
};
static const float quad4_color[] =
{
......@@ -7870,6 +7876,7 @@ static void test_vshader_input(void)
{
D3DVSD_STREAM(0),
D3DVSD_REG(0, D3DVSDT_FLOAT3), /* position */
D3DVSD_SKIP(3), /* not used */
D3DVSD_REG(5, D3DVSDT_D3DCOLOR), /* diffuse */
D3DVSD_END()
};
......
......@@ -291,8 +291,8 @@ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3
offset += wined3d_type_sizes[type];
} else if (token_type == D3DVSD_TOKEN_STREAMDATA && (*token & D3DVSD_DATALOADTYPEMASK)) {
TRACE(" 0x%08x SKIP(%u)\n", token_type, ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
offset += sizeof(DWORD) * ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
TRACE(" 0x%08x SKIP(%u)\n", *token, (*token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
offset += sizeof(DWORD) * ((*token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
}
if (element_count >= 127) {
......
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