Henri Verbeet : wined3d: Get rid of stateblock_savedstates_copy().

Alexandre Julliard julliard at winehq.org
Thu Oct 1 09:48:18 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Oct  1 11:36:06 2009 +0200

wined3d: Get rid of stateblock_savedstates_copy().

This is redundant because we call stateblock_savedstates_set() further down.

---

 dlls/wined3d/stateblock.c |   38 --------------------------------------
 1 files changed, 0 insertions(+), 38 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 4034f1a..3c6863e 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -71,41 +71,6 @@ fail:
     return E_OUTOFMEMORY;
 }
 
-/* Copy all members of one stateblock to another */
-static void stateblock_savedstates_copy(SAVEDSTATES *dest, const SAVEDSTATES *source,
-        const struct wined3d_gl_info *gl_info)
-{
-    /* Single values */
-    dest->primitive_type = source->primitive_type;
-    dest->indices = source->indices;
-    dest->material = source->material;
-    dest->viewport = source->viewport;
-    dest->vertexDecl = source->vertexDecl;
-    dest->pixelShader = source->pixelShader;
-    dest->vertexShader = source->vertexShader;
-    dest->scissorRect = dest->scissorRect;
-
-    /* Fixed size arrays */
-    dest->streamSource = source->streamSource;
-    dest->streamFreq = source->streamFreq;
-    dest->textures = source->textures;
-    memcpy(dest->transform, source->transform, sizeof(source->transform));
-    memcpy(dest->renderState, source->renderState, sizeof(source->renderState));
-    memcpy(dest->textureState, source->textureState, sizeof(source->textureState));
-    memcpy(dest->samplerState, source->samplerState, sizeof(source->samplerState));
-    dest->clipplane = source->clipplane;
-    dest->pixelShaderConstantsB = source->pixelShaderConstantsB;
-    dest->pixelShaderConstantsI = source->pixelShaderConstantsI;
-    dest->vertexShaderConstantsB = source->vertexShaderConstantsB;
-    dest->vertexShaderConstantsI = source->vertexShaderConstantsI;
-
-    /* Dynamically sized arrays */
-    memcpy(dest->pixelShaderConstantsF, source->pixelShaderConstantsF,
-            sizeof(BOOL) * gl_info->max_pshader_constantsF);
-    memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF,
-            sizeof(BOOL) * gl_info->max_vshader_constantsF);
-}
-
 static inline void stateblock_set_bits(DWORD *map, UINT map_size)
 {
     DWORD mask = (1 << (map_size & 0x1f)) - 1;
@@ -1484,9 +1449,6 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
     /* Otherwise, might as well set the whole state block to the appropriate values  */
     if (device->stateBlock)
     {
-        /* Saved states */
-        stateblock_savedstates_copy(&stateblock->changed, &device->stateBlock->changed, gl_info);
-
         /* Saved values */
         stateblock_copy_values(stateblock, device->stateBlock, gl_info);
     }




More information about the wine-cvs mailing list