Commit b28aff0d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

wined3d: Use assignment instead of memcpy to copy structs.

parent b5d4c20b
......@@ -6448,7 +6448,7 @@ static void fragment_prog_arbfp(struct wined3d_context *context, const struct wi
return;
}
memcpy(&new_desc->parent.settings, &settings, sizeof(settings));
new_desc->parent.settings = settings;
new_desc->shader = gen_arbfp_ffp_shader(&settings, gl_info);
add_ffp_frag_shader(&priv->fragment_shaders, &new_desc->parent);
TRACE("Allocated fixed function replacement shader descriptor %p\n", new_desc);
......
......@@ -861,7 +861,7 @@ static void set_tex_op_atifs(struct wined3d_context *context, const struct wined
new_desc->num_textures_used = i + 1;
}
memcpy(&new_desc->parent.settings, &settings, sizeof(settings));
new_desc->parent.settings = settings;
new_desc->shader = gen_ati_shader(settings.op, gl_info);
add_ffp_frag_shader(&priv->fragment_shaders, &new_desc->parent);
TRACE("Allocated fixed function replacement shader descriptor %p\n", new_desc);
......
......@@ -1168,11 +1168,11 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
memset(stateblock->changed.vertexShaderConstantsF, 0, device->d3d_vshader_constantF * sizeof(BOOL));
/* Set some of the defaults for lights, transforms etc */
memcpy(&state->transforms[WINED3D_TS_PROJECTION], &identity, sizeof(identity));
memcpy(&state->transforms[WINED3D_TS_VIEW], &identity, sizeof(identity));
state->transforms[WINED3D_TS_PROJECTION] = identity;
state->transforms[WINED3D_TS_VIEW] = identity;
for (i = 0; i < 256; ++i)
{
memcpy(&state->transforms[WINED3D_TS_WORLD_MATRIX(i)], &identity, sizeof(identity));
state->transforms[WINED3D_TS_WORLD_MATRIX(i)] = identity;
}
state->fb = &device->fb;
......@@ -1313,7 +1313,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
for (i = 0; i < MAX_TEXTURES; ++i)
{
TRACE("Setting up default texture states for texture Stage %u.\n", i);
memcpy(&state->transforms[WINED3D_TS_TEXTURE0 + i], &identity, sizeof(identity));
state->transforms[WINED3D_TS_TEXTURE0 + i] = identity;
state->texture_states[i][WINED3D_TSS_COLOR_OP] = i ? WINED3D_TOP_DISABLE : WINED3D_TOP_MODULATE;
state->texture_states[i][WINED3D_TSS_COLOR_ARG1] = WINED3DTA_TEXTURE;
state->texture_states[i][WINED3D_TSS_COLOR_ARG2] = WINED3DTA_CURRENT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment