Stefan Dösinger : d3d9: Rework the converted vertex declaration management.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Apr 18 06:58:48 CDT 2007


Module: wine
Branch: master
Commit: 725f4bfeb10fb1b7574df46e7f6492ab3f581970
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=725f4bfeb10fb1b7574df46e7f6492ab3f581970

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Apr 17 20:04:26 2007 +0200

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            |   11 ++--
 dlls/d3d9/device.c                  |   87 +++++++++++++++++++++++++++++------
 dlls/d3d9/directx.c                 |    5 ++
 dlls/d3d9/tests/vertexdeclaration.c |   25 ++++++++--
 dlls/d3d9/vertexdeclaration.c       |   30 ++++++------
 5 files changed, 118 insertions(+), 40 deletions(-)

Diff:   http://source.winehq.org/git/wine.git/?a=commitdiff;h=725f4bfeb10fb1b7574df46e7f6492ab3f581970



More information about the wine-cvs mailing list