[PATCH] WineD3D: Initialize the state table before filling it=0A=

Stefan Doesinger stefan at codeweavers.com
Wed Jul 2 15:27:46 CDT 2008


=0A=
This will be needed once the temptable which sets undefined states is=0A=
removed. Especially state 0 will be applied once after the device =
creation=0A=
because all states are dirtified at device creation=0A=
---=0A=
 dlls/wined3d/state.c |    5 +++++=0A=
 1 files changed, 5 insertions(+), 0 deletions(-)=0A=
=0A=
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c=0A=
index 6a6cc36..9334d25 100644=0A=
--- a/dlls/wined3d/state.c=0A=
+++ b/dlls/wined3d/state.c=0A=
@@ -5417,6 +5417,11 @@ void compile_state_table(struct StateEntry =
*StateTable,=0A=
 =0A=
     memset(multistate_funcs, 0, sizeof(multistate_funcs));=0A=
 =0A=
+    for(i =3D 0; i < STATE_HIGHEST + 1; i++) {=0A=
+        StateTable[i].representative =3D 0;=0A=
+        StateTable[i].apply =3D state_undefined;=0A=
+    }=0A=
+=0A=
     for(type =3D 0; type < 3; type++) {=0A=
         /* This switch decides the order in which the states are =
applied */=0A=
         switch(type) {=0A=
-- =0A=
1.5.4.5=0A=
=0A=

------=_NextPart_000_0028_01C8E154.86F0F560--




More information about the wine-patches mailing list