[PATCH 03/12] wined3d: Rename MAX_CONST_I to WINED3D_MAX_CONSTS_I.
Henri Verbeet
hverbeet at codeweavers.com
Tue May 17 07:01:47 CDT 2016
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
dlls/wined3d/arb_program_shader.c | 20 ++++++++++----------
dlls/wined3d/device.c | 16 ++++++++--------
dlls/wined3d/glsl_shader.c | 10 +++++-----
dlls/wined3d/stateblock.c | 4 ++--
dlls/wined3d/wined3d_private.h | 18 +++++++++---------
5 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 9b93478..fde8811 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -165,7 +165,7 @@ struct arb_ps_compile_args
struct ps_compile_args super;
WORD bools;
WORD clip; /* only a boolean, use a WORD for alignment */
- unsigned char loop_ctrl[MAX_CONST_I][3];
+ unsigned char loop_ctrl[WINED3D_MAX_CONSTS_I][3];
};
struct stb_const_desc
@@ -180,7 +180,7 @@ struct arb_ps_compiled_shader
struct arb_ps_np2fixup_info np2fixup_info;
struct stb_const_desc bumpenvmatconst[MAX_TEXTURES];
struct stb_const_desc luminanceconst[MAX_TEXTURES];
- UINT int_consts[MAX_CONST_I];
+ UINT int_consts[WINED3D_MAX_CONSTS_I];
GLuint prgId;
UINT ycorrection;
unsigned char numbumpenvmatconsts;
@@ -206,14 +206,14 @@ struct arb_vs_compile_args
unsigned char samplers[4];
DWORD samplers_compare;
} vertex;
- unsigned char loop_ctrl[MAX_CONST_I][3];
+ unsigned char loop_ctrl[WINED3D_MAX_CONSTS_I][3];
};
struct arb_vs_compiled_shader
{
struct arb_vs_compile_args args;
GLuint prgId;
- UINT int_consts[MAX_CONST_I];
+ UINT int_consts[WINED3D_MAX_CONSTS_I];
char num_int_consts;
char need_color_unclamp;
UINT pos_fixup;
@@ -590,7 +590,7 @@ static void shader_arb_ps_local_constants(const struct arb_ps_compiled_shader *g
if (!gl_shader->num_int_consts) return;
- for(i = 0; i < MAX_CONST_I; i++)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if(gl_shader->int_consts[i] != WINED3D_CONST_NUM_UNUSED)
{
@@ -620,7 +620,7 @@ static void shader_arb_vs_local_constants(const struct arb_vs_compiled_shader *g
if (!gl_shader->num_int_consts) return;
- for(i = 0; i < MAX_CONST_I; i++)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if(gl_shader->int_consts[i] != WINED3D_CONST_NUM_UNUSED)
{
@@ -3842,7 +3842,7 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
i, compiled->luminanceconst[bump_const].const_num);
}
- for(i = 0; i < MAX_CONST_I; i++)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
compiled->int_consts[i] = WINED3D_CONST_NUM_UNUSED;
if (reg_maps->integer_constants & (1u << i) && priv_ctx.target_version >= NV2)
@@ -4290,7 +4290,7 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader,
shader_generate_arb_declarations(shader, reg_maps, buffer, gl_info,
&priv_ctx.vs_clipplanes, &priv_ctx);
- for(i = 0; i < MAX_CONST_I; i++)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
compiled->int_consts[i] = WINED3D_CONST_NUM_UNUSED;
if (reg_maps->integer_constants & (1u << i) && priv_ctx.target_version >= NV2)
@@ -4588,7 +4588,7 @@ static void find_arb_ps_compile_args(const struct wined3d_state *state,
return;
}
- for (i = 0; i < MAX_CONST_I; ++i)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if (int_skip & (1u << i))
{
@@ -4665,7 +4665,7 @@ static void find_arb_vs_compile_args(const struct wined3d_state *state,
return;
}
- for(i = 0; i < MAX_CONST_I; i++)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if (int_skip & (1u << i))
{
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 6b03d75..06cf173 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2421,13 +2421,13 @@ HRESULT CDECL wined3d_device_get_vs_consts_b(const struct wined3d_device *device
HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
UINT start_register, const int *constants, UINT vector4i_count)
{
- UINT count = min(vector4i_count, MAX_CONST_I - start_register);
+ UINT count = min(vector4i_count, WINED3D_MAX_CONSTS_I - start_register);
UINT i;
TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n",
device, start_register, constants, vector4i_count);
- if (!constants || start_register >= MAX_CONST_I)
+ if (!constants || start_register >= WINED3D_MAX_CONSTS_I)
return WINED3DERR_INVALIDCALL;
memcpy(&device->update_state->vs_consts_i[start_register * 4], constants, count * sizeof(int) * 4);
@@ -2452,12 +2452,12 @@ HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device,
HRESULT CDECL wined3d_device_get_vs_consts_i(const struct wined3d_device *device,
UINT start_register, int *constants, UINT vector4i_count)
{
- UINT count = min(vector4i_count, MAX_CONST_I - start_register);
+ UINT count = min(vector4i_count, WINED3D_MAX_CONSTS_I - start_register);
TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n",
device, start_register, constants, vector4i_count);
- if (!constants || start_register >= MAX_CONST_I)
+ if (!constants || start_register >= WINED3D_MAX_CONSTS_I)
return WINED3DERR_INVALIDCALL;
memcpy(constants, &device->state.vs_consts_i[start_register * 4], count * sizeof(int) * 4);
@@ -2648,13 +2648,13 @@ HRESULT CDECL wined3d_device_get_ps_consts_b(const struct wined3d_device *device
HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
UINT start_register, const int *constants, UINT vector4i_count)
{
- UINT count = min(vector4i_count, MAX_CONST_I - start_register);
+ UINT count = min(vector4i_count, WINED3D_MAX_CONSTS_I - start_register);
UINT i;
TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n",
device, start_register, constants, vector4i_count);
- if (!constants || start_register >= MAX_CONST_I)
+ if (!constants || start_register >= WINED3D_MAX_CONSTS_I)
return WINED3DERR_INVALIDCALL;
memcpy(&device->update_state->ps_consts_i[start_register * 4], constants, count * sizeof(int) * 4);
@@ -2679,12 +2679,12 @@ HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device,
HRESULT CDECL wined3d_device_get_ps_consts_i(const struct wined3d_device *device,
UINT start_register, int *constants, UINT vector4i_count)
{
- UINT count = min(vector4i_count, MAX_CONST_I - start_register);
+ UINT count = min(vector4i_count, WINED3D_MAX_CONSTS_I - start_register);
TRACE("device %p, start_register %u, constants %p, vector4i_count %u.\n",
device, start_register, constants, vector4i_count);
- if (!constants || start_register >= MAX_CONST_I)
+ if (!constants || start_register >= WINED3D_MAX_CONSTS_I)
return WINED3DERR_INVALIDCALL;
memcpy(constants, &device->state.ps_consts_i[start_register * 4], count * sizeof(int) * 4);
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index a360df8..4c60839 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -118,7 +118,7 @@ struct glsl_vs_program
GLuint id;
GLenum vertex_color_clamp;
GLint uniform_f_locations[WINED3D_MAX_VS_CONSTS_F];
- GLint uniform_i_locations[MAX_CONST_I];
+ GLint uniform_i_locations[WINED3D_MAX_CONSTS_I];
GLint uniform_b_locations[MAX_CONST_B];
GLint pos_fixup_location;
@@ -166,7 +166,7 @@ struct glsl_ps_program
struct list shader_entry;
GLuint id;
GLint uniform_f_locations[WINED3D_MAX_PS_CONSTS_F];
- GLint uniform_i_locations[MAX_CONST_I];
+ GLint uniform_i_locations[WINED3D_MAX_CONSTS_I];
GLint uniform_b_locations[MAX_CONST_B];
GLint bumpenv_mat_location[MAX_TEXTURES];
GLint bumpenv_lum_scale_location[MAX_TEXTURES];
@@ -729,7 +729,7 @@ static void shader_glsl_load_constants_f(const struct wined3d_shader *shader, co
/* Context activation is done by the caller. */
static void shader_glsl_load_constantsI(const struct wined3d_shader *shader, const struct wined3d_gl_info *gl_info,
- const GLint locations[MAX_CONST_I], const int *constants, WORD constants_set)
+ const GLint locations[WINED3D_MAX_CONSTS_I], const int *constants, WORD constants_set)
{
unsigned int i;
struct list* ptr;
@@ -7019,7 +7019,7 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
}
memset(&vs->uniform_f_locations[vs_c_count], 0xff, (WINED3D_MAX_VS_CONSTS_F - vs_c_count) * sizeof(GLuint));
- for (i = 0; i < MAX_CONST_I; ++i)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
string_buffer_sprintf(name, "vs_i[%u]", i);
vs->uniform_i_locations[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
@@ -7101,7 +7101,7 @@ static void shader_glsl_init_ps_uniform_locations(const struct wined3d_gl_info *
}
memset(&ps->uniform_f_locations[ps_c_count], 0xff, (WINED3D_MAX_PS_CONSTS_F - ps_c_count) * sizeof(GLuint));
- for (i = 0; i < MAX_CONST_I; ++i)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
string_buffer_sprintf(name, "ps_i[%u]", i);
ps->uniform_i_locations[i] = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 2b45d9c..b29dee4 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -321,7 +321,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
}
}
- for (i = 0; i < MAX_CONST_I; ++i)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if (stateblock->changed.vertexShaderConstantsI & (1u << i))
{
@@ -348,7 +348,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
}
}
- for (i = 0; i < MAX_CONST_I; ++i)
+ for (i = 0; i < WINED3D_MAX_CONSTS_I; ++i)
{
if (stateblock->changed.pixelShaderConstantsI & (1u << i))
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index d69fbec..305160e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -510,9 +510,9 @@ enum wined3d_shader_rel_op
#define MAX_REG_TEXCRD 8
#define MAX_REG_INPUT 32
#define MAX_REG_OUTPUT 32
-#define MAX_CONST_I 16
#define MAX_CONST_B 16
#define WINED3D_MAX_CBS 15
+#define WINED3D_MAX_CONSTS_I 16
#define WINED3D_MAX_VS_CONSTS_F 256
#define WINED3D_MAX_PS_CONSTS_F 224
@@ -761,9 +761,9 @@ struct wined3d_shader_reg_maps
} u;
DWORD input_registers; /* max(MAX_REG_INPUT, MAX_ATTRIBS), 32 */
DWORD output_registers; /* MAX_REG_OUTPUT, 32 */
- WORD integer_constants; /* MAX_CONST_I, 16 */
+ WORD integer_constants; /* WINED3D_MAX_CONSTS_I, 16 */
WORD boolean_constants; /* MAX_CONST_B, 16 */
- WORD local_int_consts; /* MAX_CONST_I, 16 */
+ WORD local_int_consts; /* WINED3D_MAX_CONSTS_I, 16 */
WORD local_bool_consts; /* MAX_CONST_B, 16 */
UINT cb_sizes[WINED3D_MAX_CBS];
@@ -2212,11 +2212,11 @@ struct wined3d_state
struct wined3d_shader_resource_view *shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS];
BOOL vs_consts_b[MAX_CONST_B];
- INT vs_consts_i[MAX_CONST_I * 4];
+ INT vs_consts_i[WINED3D_MAX_CONSTS_I * 4];
struct wined3d_vec4 vs_consts_f[WINED3D_MAX_VS_CONSTS_F];
BOOL ps_consts_b[MAX_CONST_B];
- INT ps_consts_i[MAX_CONST_I * 4];
+ INT ps_consts_i[WINED3D_MAX_CONSTS_I * 4];
struct wined3d_vec4 ps_consts_f[WINED3D_MAX_PS_CONSTS_F];
struct wined3d_texture *textures[MAX_COMBINED_SAMPLERS];
@@ -2777,10 +2777,10 @@ struct wined3d_saved_states
WORD samplerState[MAX_COMBINED_SAMPLERS]; /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */
DWORD clipplane; /* WINED3DMAXUSERCLIPPLANES, 32 */
WORD pixelShaderConstantsB; /* MAX_CONST_B, 16 */
- WORD pixelShaderConstantsI; /* MAX_CONST_I, 16 */
+ WORD pixelShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
BOOL ps_consts_f[WINED3D_MAX_PS_CONSTS_F];
WORD vertexShaderConstantsB; /* MAX_CONST_B, 16 */
- WORD vertexShaderConstantsI; /* MAX_CONST_I, 16 */
+ WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */
BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F];
DWORD textures : 20; /* MAX_COMBINED_SAMPLERS, 20 */
DWORD primitive_type : 1;
@@ -2813,13 +2813,13 @@ struct wined3d_stateblock
unsigned int num_contained_render_states;
DWORD contained_transform_states[HIGHEST_TRANSFORMSTATE + 1];
unsigned int num_contained_transform_states;
- DWORD contained_vs_consts_i[MAX_CONST_I];
+ DWORD contained_vs_consts_i[WINED3D_MAX_CONSTS_I];
unsigned int num_contained_vs_consts_i;
DWORD contained_vs_consts_b[MAX_CONST_B];
unsigned int num_contained_vs_consts_b;
DWORD contained_vs_consts_f[WINED3D_MAX_VS_CONSTS_F];
unsigned int num_contained_vs_consts_f;
- DWORD contained_ps_consts_i[MAX_CONST_I];
+ DWORD contained_ps_consts_i[WINED3D_MAX_CONSTS_I];
unsigned int num_contained_ps_consts_i;
DWORD contained_ps_consts_b[MAX_CONST_B];
unsigned int num_contained_ps_consts_b;
--
2.1.4
More information about the wine-patches
mailing list