wined3d: Take the input slot into account when handling WINED3D_APPEND_ALIGNED_ELEMENT.
This commit is contained in:
parent
f3765e9f77
commit
cbe717b8f3
|
@ -218,14 +218,18 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
|
||||||
|
|
||||||
if (e->offset == WINED3D_APPEND_ALIGNED_ELEMENT)
|
if (e->offset == WINED3D_APPEND_ALIGNED_ELEMENT)
|
||||||
{
|
{
|
||||||
if (!i)
|
const struct wined3d_vertex_declaration_element *prev;
|
||||||
|
unsigned int j;
|
||||||
|
|
||||||
|
e->offset = 0;
|
||||||
|
for (j = 1; j <= i; ++j)
|
||||||
{
|
{
|
||||||
e->offset = 0;
|
prev = &declaration->elements[i - j];
|
||||||
}
|
if (prev->input_slot == e->input_slot)
|
||||||
else
|
{
|
||||||
{
|
e->offset = (prev->offset + prev->format->byte_count + 3) & ~3;
|
||||||
struct wined3d_vertex_declaration_element *prev = &declaration->elements[i - 1];
|
break;
|
||||||
e->offset = (prev->offset + prev->format->byte_count + 3) & ~3;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue