d3d9: Rework the converted vertex declaration management.
commit725f4bfeb10fb1b7574df46e7f6492ab3f581970
authorStefan Dösinger <stefan@codeweavers.com>
Tue, 17 Apr 2007 18:04:26 +0000 (17 20:04 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 18 Apr 2007 11:13:45 +0000 (18 13:13 +0200)
tree322a4d6c2a1fbce99f5530d103137b2d73d69535
parentaff22d0472a285449b17bdd913143391e8bb08b8
d3d9: Rework the converted vertex declaration management.

Instead of creating a converted declaration each time SetFVF is
called, exactly one declaration is created for each FVF(on demand) and
stored for the lifetime of the device. This avoids memory leaks and
makes keeping track of converted declarations easier. Wether a
declaration is converted from a fvf or not is now a static information
inside the declaration. Those declarations are not destroyed in
VertexDeclaration::Release, they stay for the lifetime of the
device. This keeps us free from tracking the declaration through
stateblocks
dlls/d3d9/d3d9_private.h
dlls/d3d9/device.c
dlls/d3d9/directx.c
dlls/d3d9/tests/vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c