Rico Schüller : d3d10: Reorder struct d3d10_effect_variable to make the initialisation nicer.
Alexandre Julliard
julliard at winehq.org
Mon Jan 11 15:59:34 CST 2010
Module: wine
Branch: master
Commit: 0682453d142c1ab848a103d6a7035203e3ec3787
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0682453d142c1ab848a103d6a7035203e3ec3787
Author: Rico Schüller <kgbricola at web.de>
Date: Sun Jan 10 19:30:36 2010 +0100
d3d10: Reorder struct d3d10_effect_variable to make the initialisation nicer.
---
dlls/d3d10/d3d10_private.h | 2 +-
dlls/d3d10/effect.c | 80 +++++++++++++++++--------------------------
2 files changed, 33 insertions(+), 49 deletions(-)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
index 5bf59b1..6fa60dd 100644
--- a/dlls/d3d10/d3d10_private.h
+++ b/dlls/d3d10/d3d10_private.h
@@ -102,6 +102,7 @@ struct d3d10_effect_variable
const struct ID3D10EffectVariableVtbl *vtbl;
struct d3d10_effect_variable *buffer;
+ struct d3d10_effect_type *type;
struct d3d10_effect *effect;
char *name;
@@ -110,7 +111,6 @@ struct d3d10_effect_variable
DWORD annotation_count;
DWORD flag;
DWORD data_size;
- struct d3d10_effect_type *type;
struct d3d10_effect_variable *elements;
struct d3d10_effect_variable *members;
struct d3d10_effect_variable *annotations;
diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c
index 65ad689..12535aa 100644
--- a/dlls/d3d10/effect.c
+++ b/dlls/d3d10/effect.c
@@ -1,5 +1,6 @@
/*
* Copyright 2009 Henri Verbeet for CodeWeavers
+ * Copyright 2009 Rico Schüller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -64,54 +65,37 @@ static const struct ID3D10EffectSamplerVariableVtbl d3d10_effect_sampler_variabl
static const struct ID3D10EffectTypeVtbl d3d10_effect_type_vtbl;
/* null objects - needed for invalid calls */
-static struct d3d10_effect_technique null_technique =
- {&d3d10_effect_technique_vtbl, NULL, NULL, 0, 0, NULL, NULL};
-static struct d3d10_effect_pass null_pass =
- {&d3d10_effect_pass_vtbl, NULL, NULL, 0, 0, 0, NULL, NULL};
-static struct d3d10_effect_type null_type =
- {&d3d10_effect_type_vtbl, 0, {NULL, NULL, 0}, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL};
-static struct d3d10_effect_variable null_local_buffer =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_variable =
- {&d3d10_effect_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_scalar_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_vector_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_matrix_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_string_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_shader_resource_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_render_target_view_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_depth_stencil_view_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_shader_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_blend_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_depth_stencil_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_rasterizer_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
-static struct d3d10_effect_variable null_sampler_variable =
- {(ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl, &null_local_buffer,
- NULL, NULL, NULL, 0, 0, 0, 0, &null_type, NULL, NULL, NULL};
+static struct d3d10_effect_technique null_technique = {&d3d10_effect_technique_vtbl};
+static struct d3d10_effect_pass null_pass = {&d3d10_effect_pass_vtbl};
+static struct d3d10_effect_type null_type = {&d3d10_effect_type_vtbl};
+static struct d3d10_effect_variable null_local_buffer = {(ID3D10EffectVariableVtbl *)&d3d10_effect_constant_buffer_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_variable = {&d3d10_effect_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_scalar_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_scalar_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_vector_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_vector_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_matrix_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_matrix_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_string_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_string_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_shader_resource_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_resource_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_render_target_view_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_render_target_view_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_depth_stencil_view_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_view_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_shader_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_shader_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_blend_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_blend_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_depth_stencil_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_depth_stencil_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_rasterizer_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_rasterizer_variable_vtbl,
+ &null_local_buffer, &null_type};
+static struct d3d10_effect_variable null_sampler_variable = {(ID3D10EffectVariableVtbl *)&d3d10_effect_sampler_variable_vtbl,
+ &null_local_buffer, &null_type};
static struct d3d10_effect_type *get_fx10_type(struct d3d10_effect *effect, const char *data, DWORD offset);
More information about the wine-cvs
mailing list