Commit 32d73eab authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wined3d: Avoid double initialization.

parent 7e96e4cc
...@@ -5417,8 +5417,8 @@ static void get_loop_control_const(const struct wined3d_shader_instruction *ins, ...@@ -5417,8 +5417,8 @@ static void get_loop_control_const(const struct wined3d_shader_instruction *ins,
static void record_instruction(struct list *list, const struct wined3d_shader_instruction *ins) static void record_instruction(struct list *list, const struct wined3d_shader_instruction *ins)
{ {
unsigned int i; unsigned int i;
struct wined3d_shader_dst_param *dst_param = NULL; struct wined3d_shader_dst_param *dst_param;
struct wined3d_shader_src_param *src_param = NULL, *rel_addr = NULL; struct wined3d_shader_src_param *src_param = NULL, *rel_addr;
struct recorded_instruction *rec = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*rec)); struct recorded_instruction *rec = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*rec));
if(!rec) if(!rec)
{ {
......
...@@ -650,7 +650,7 @@ drop_query: ...@@ -650,7 +650,7 @@ drop_query:
static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info, DWORD flags) static void buffer_direct_upload(struct wined3d_buffer *This, const struct wined3d_gl_info *gl_info, DWORD flags)
{ {
BYTE *map; BYTE *map;
UINT start = 0, len = 0; UINT start, len;
/* This potentially invalidates the element array buffer binding, but the /* This potentially invalidates the element array buffer binding, but the
* caller always takes care of this. */ * caller always takes care of this. */
...@@ -722,7 +722,7 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte ...@@ -722,7 +722,7 @@ void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_conte
{ {
DWORD flags = buffer->flags & (WINED3D_BUFFER_SYNC | WINED3D_BUFFER_DISCARD); DWORD flags = buffer->flags & (WINED3D_BUFFER_SYNC | WINED3D_BUFFER_DISCARD);
struct wined3d_device *device = buffer->resource.device; struct wined3d_device *device = buffer->resource.device;
UINT start = 0, end = 0, len = 0, vertices; UINT start, end, len, vertices;
const struct wined3d_gl_info *gl_info; const struct wined3d_gl_info *gl_info;
BOOL decl_changed = FALSE; BOOL decl_changed = FALSE;
unsigned int i, j; unsigned int i, j;
......
...@@ -99,7 +99,7 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_ ...@@ -99,7 +99,7 @@ static void drawStridedSlow(const struct wined3d_device *device, struct wined3d_
const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType, const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType,
const void *idxData, UINT idxSize, UINT startIdx) const void *idxData, UINT idxSize, UINT startIdx)
{ {
unsigned int textureNo = 0; unsigned int textureNo;
const WORD *pIdxBufS = NULL; const WORD *pIdxBufS = NULL;
const DWORD *pIdxBufL = NULL; const DWORD *pIdxBufL = NULL;
UINT vx_index; UINT vx_index;
......
...@@ -1284,7 +1284,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context ...@@ -1284,7 +1284,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_gl_info *gl_info = context->gl_info;
struct shader_glsl_priv *priv = shader_priv; struct shader_glsl_priv *priv = shader_priv;
float position_fixup[4]; float position_fixup[4];
DWORD update_mask = 0; DWORD update_mask;
struct glsl_shader_prog_link *prog = ctx_data->glsl_program; struct glsl_shader_prog_link *prog = ctx_data->glsl_program;
UINT constant_version; UINT constant_version;
...@@ -2065,8 +2065,6 @@ static const char * const shift_glsl_tab[] = { ...@@ -2065,8 +2065,6 @@ static const char * const shift_glsl_tab[] = {
static void shader_glsl_gen_modifier(enum wined3d_shader_src_modifier src_modifier, static void shader_glsl_gen_modifier(enum wined3d_shader_src_modifier src_modifier,
const char *in_reg, const char *in_regswizzle, char *out_str) const char *in_reg, const char *in_regswizzle, char *out_str)
{ {
out_str[0] = 0;
switch (src_modifier) switch (src_modifier)
{ {
case WINED3DSPSM_DZ: /* Need to handle this in the instructions itself (texld & texcrd). */ case WINED3DSPSM_DZ: /* Need to handle this in the instructions itself (texld & texcrd). */
...@@ -3107,7 +3105,7 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins) ...@@ -3107,7 +3105,7 @@ static void shader_glsl_dot(const struct wined3d_shader_instruction *ins)
struct glsl_src_param src0_param; struct glsl_src_param src0_param;
struct glsl_src_param src1_param; struct glsl_src_param src1_param;
DWORD dst_write_mask, src_write_mask; DWORD dst_write_mask, src_write_mask;
unsigned int dst_size = 0; unsigned int dst_size;
dst_write_mask = shader_glsl_append_dst(buffer, ins); dst_write_mask = shader_glsl_append_dst(buffer, ins);
dst_size = shader_glsl_get_write_mask_size(dst_write_mask); dst_size = shader_glsl_get_write_mask_size(dst_write_mask);
...@@ -4960,7 +4958,7 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv, ...@@ -4960,7 +4958,7 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
BOOL per_vertex_point_size, BOOL flatshading, const struct wined3d_gl_info *gl_info) BOOL per_vertex_point_size, BOOL flatshading, const struct wined3d_gl_info *gl_info)
{ {
struct wined3d_string_buffer *buffer = &priv->shader_buffer; struct wined3d_string_buffer *buffer = &priv->shader_buffer;
GLuint ret = 0; GLuint ret;
DWORD ps_major = ps ? ps->reg_maps.shader_version.major : 0; DWORD ps_major = ps ? ps->reg_maps.shader_version.major : 0;
unsigned int i; unsigned int i;
const char *semantic_name; const char *semantic_name;
...@@ -6878,7 +6876,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const ...@@ -6878,7 +6876,7 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const
struct wined3d_shader *vshader = NULL; struct wined3d_shader *vshader = NULL;
struct wined3d_shader *gshader = NULL; struct wined3d_shader *gshader = NULL;
struct wined3d_shader *pshader = NULL; struct wined3d_shader *pshader = NULL;
GLuint program_id = 0; GLuint program_id;
GLuint reorder_shader_id = 0; GLuint reorder_shader_id = 0;
unsigned int i; unsigned int i;
GLuint vs_id = 0; GLuint vs_id = 0;
......
...@@ -3198,7 +3198,7 @@ static void load_tex_coords(const struct wined3d_context *context, const struct ...@@ -3198,7 +3198,7 @@ static void load_tex_coords(const struct wined3d_context *context, const struct
{ {
const struct wined3d_gl_info *gl_info = context->gl_info; const struct wined3d_gl_info *gl_info = context->gl_info;
unsigned int mapped_stage = 0; unsigned int mapped_stage = 0;
unsigned int textureNo = 0; unsigned int textureNo;
for (textureNo = 0; textureNo < context->d3d_info->limits.ffp_blend_stages; ++textureNo) for (textureNo = 0; textureNo < context->d3d_info->limits.ffp_blend_stages; ++textureNo)
{ {
......
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