d3d9: Handle stateblocks in d3d9_device_SetVertexDeclaration().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-09-30 20:28:33 -05:00 committed by Alexandre Julliard
parent d7eecf7f20
commit 3b7967cdd6
1 changed files with 4 additions and 1 deletions

View File

@ -3232,8 +3232,11 @@ static HRESULT WINAPI d3d9_device_SetVertexDeclaration(IDirect3DDevice9Ex *iface
TRACE("iface %p, declaration %p.\n", iface, declaration);
wined3d_mutex_lock();
wined3d_device_set_vertex_declaration(device->wined3d_device,
wined3d_stateblock_set_vertex_declaration(device->update_state,
decl_impl ? decl_impl->wined3d_declaration : NULL);
if (!device->recording)
wined3d_device_set_vertex_declaration(device->wined3d_device,
decl_impl ? decl_impl->wined3d_declaration : NULL);
device->has_vertex_declaration = !!decl_impl;
wined3d_mutex_unlock();