Henri Verbeet : wined3d: Explicitly pass gl_info to stateblock_savedstates_copy().
Alexandre Julliard
julliard at winehq.org
Tue Sep 29 11:09:09 CDT 2009
Module: wine
Branch: master
Commit: 49f712beff20371533a69a52594a6e8e59f90aa0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=49f712beff20371533a69a52594a6e8e59f90aa0
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Sep 29 11:09:07 2009 +0200
wined3d: Explicitly pass gl_info to stateblock_savedstates_copy().
---
dlls/wined3d/stateblock.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index eaa3262..bd868d7 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -71,12 +71,10 @@ fail:
return E_OUTOFMEMORY;
}
-/** Copy all members of one stateblock to another */
-static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES *dest, const SAVEDSTATES *source)
+/* 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)
{
- IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
- unsigned bsize = sizeof(BOOL);
-
/* Single values */
dest->primitive_type = source->primitive_type;
dest->indices = source->indices;
@@ -102,8 +100,10 @@ static void stateblock_savedstates_copy(IWineD3DStateBlock* iface, SAVEDSTATES *
dest->vertexShaderConstantsI = source->vertexShaderConstantsI;
/* Dynamically sized arrays */
- memcpy(dest->pixelShaderConstantsF, source->pixelShaderConstantsF, bsize * GL_LIMITS(pshader_constantsF));
- memcpy(dest->vertexShaderConstantsF, source->vertexShaderConstantsF, bsize * GL_LIMITS(vshader_constantsF));
+ 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)
@@ -179,7 +179,7 @@ static void stateblock_copy(IWineD3DStateBlockImpl *dst, IWineD3DStateBlockImpl
dst->blockType = src->blockType;
/* Saved states */
- stateblock_savedstates_copy((IWineD3DStateBlock *)src, &dst->changed, &src->changed);
+ stateblock_savedstates_copy(&dst->changed, &src->changed, gl_info);
/* Single items */
dst->gl_primitive_type = src->gl_primitive_type;
More information about the wine-cvs
mailing list