Commit 10ecdca9 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Rename MAX_ACTIVE_LIGHTS to WINED3D_MAX_ACTIVE_LIGHTS.

parent 8b24bc95
...@@ -181,7 +181,7 @@ struct glsl_vs_program ...@@ -181,7 +181,7 @@ struct glsl_vs_program
GLint q_att; GLint q_att;
GLint cos_htheta; GLint cos_htheta;
GLint cos_hphi; GLint cos_hphi;
} light_location[MAX_ACTIVE_LIGHTS]; } light_location[WINED3D_MAX_ACTIVE_LIGHTS];
GLint pointsize_location; GLint pointsize_location;
GLint pointsize_min_location; GLint pointsize_min_location;
GLint pointsize_max_location; GLint pointsize_max_location;
...@@ -1892,7 +1892,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context ...@@ -1892,7 +1892,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
DWORD directional_count = 0; DWORD directional_count = 0;
DWORD parallel_point_count = 0; DWORD parallel_point_count = 0;
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) for (i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
{ {
if (!state->light_state.lights[i]) if (!state->light_state.lights[i])
continue; continue;
...@@ -1922,7 +1922,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context ...@@ -1922,7 +1922,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context
parallel_point_idx = directional_idx + directional_count; parallel_point_idx = directional_idx + directional_count;
shader_glsl_ffp_vertex_lightambient_uniform(context, state, prog); shader_glsl_ffp_vertex_lightambient_uniform(context, state, prog);
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) for (i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
{ {
const struct wined3d_light_info *light_info = state->light_state.lights[i]; const struct wined3d_light_info *light_info = state->light_state.lights[i];
unsigned int idx; unsigned int idx;
...@@ -9185,7 +9185,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr ...@@ -9185,7 +9185,7 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
shader_addline(buffer, " float q_att;\n"); shader_addline(buffer, " float q_att;\n");
shader_addline(buffer, " float cos_htheta;\n"); shader_addline(buffer, " float cos_htheta;\n");
shader_addline(buffer, " float cos_hphi;\n"); shader_addline(buffer, " float cos_hphi;\n");
shader_addline(buffer, "} ffp_light[%u];\n", MAX_ACTIVE_LIGHTS); shader_addline(buffer, "} ffp_light[%u];\n", WINED3D_MAX_ACTIVE_LIGHTS);
if (settings->point_size) if (settings->point_size)
{ {
...@@ -10132,7 +10132,7 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info * ...@@ -10132,7 +10132,7 @@ static void shader_glsl_init_vs_uniform_locations(const struct wined3d_gl_info *
vs->material_emissive_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.emissive")); vs->material_emissive_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.emissive"));
vs->material_shininess_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.shininess")); vs->material_shininess_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_material.shininess"));
vs->light_ambient_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_light_ambient")); vs->light_ambient_location = GL_EXTCALL(glGetUniformLocation(program_id, "ffp_light_ambient"));
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) for (i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
{ {
string_buffer_sprintf(name, "ffp_light[%u].diffuse", i); string_buffer_sprintf(name, "ffp_light[%u].diffuse", i);
vs->light_location[i].diffuse = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer)); vs->light_location[i].diffuse = GL_EXTCALL(glGetUniformLocation(program_id, name->buffer));
...@@ -11661,7 +11661,7 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info, ...@@ -11661,7 +11661,7 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info,
caps->xyzrhw = TRUE; caps->xyzrhw = TRUE;
caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info); caps->emulated_flatshading = !needs_legacy_glsl_syntax(gl_info);
caps->ffp_generic_attributes = TRUE; caps->ffp_generic_attributes = TRUE;
caps->max_active_lights = MAX_ACTIVE_LIGHTS; caps->max_active_lights = WINED3D_MAX_ACTIVE_LIGHTS;
caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS; caps->max_vertex_blend_matrices = MAX_VERTEX_BLENDS;
caps->max_vertex_blend_matrix_index = 0; caps->max_vertex_blend_matrix_index = 0;
caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN caps->vertex_processing_caps = WINED3DVTXPCAPS_TEXGEN
......
...@@ -579,7 +579,7 @@ void state_cleanup(struct wined3d_state *state) ...@@ -579,7 +579,7 @@ void state_cleanup(struct wined3d_state *state)
if (!(state->flags & WINED3D_STATE_NO_REF)) if (!(state->flags & WINED3D_STATE_NO_REF))
state_unbind_resources(state); state_unbind_resources(state);
for (counter = 0; counter < MAX_ACTIVE_LIGHTS; ++counter) for (counter = 0; counter < WINED3D_MAX_ACTIVE_LIGHTS; ++counter)
{ {
state->light_state.lights[counter] = NULL; state->light_state.lights[counter] = NULL;
} }
......
...@@ -6279,7 +6279,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, ...@@ -6279,7 +6279,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
if (d3d_info->limits.varying_count >= wined3d_max_compat_varyings(gl_info)) if (d3d_info->limits.varying_count >= wined3d_max_compat_varyings(gl_info))
settings->texcoords = (1u << WINED3D_MAX_TEXTURES) - 1; settings->texcoords = (1u << WINED3D_MAX_TEXTURES) - 1;
for (i = 0; i < MAX_ACTIVE_LIGHTS; ++i) for (i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
{ {
if (!state->light_state.lights[i]) if (!state->light_state.lights[i])
continue; continue;
......
...@@ -263,7 +263,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup ...@@ -263,7 +263,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup
#define WINED3D_MAX_FRAGMENT_SAMPLERS 16 #define WINED3D_MAX_FRAGMENT_SAMPLERS 16
#define WINED3D_MAX_VERTEX_SAMPLERS 4 #define WINED3D_MAX_VERTEX_SAMPLERS 4
#define WINED3D_MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS) #define WINED3D_MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS)
#define MAX_ACTIVE_LIGHTS 8 #define WINED3D_MAX_ACTIVE_LIGHTS 8
#define MAX_CLIP_DISTANCES 8 #define MAX_CLIP_DISTANCES 8
#define MAX_CONSTANT_BUFFERS 15 #define MAX_CONSTANT_BUFFERS 15
#define MAX_SAMPLER_OBJECTS 16 #define MAX_SAMPLER_OBJECTS 16
...@@ -1615,9 +1615,9 @@ enum wined3d_pipeline ...@@ -1615,9 +1615,9 @@ enum wined3d_pipeline
#define STATE_LIGHT_TYPE (STATE_VIEWPORT + 1) #define STATE_LIGHT_TYPE (STATE_VIEWPORT + 1)
#define STATE_IS_LIGHT_TYPE(a) ((a) == STATE_LIGHT_TYPE) #define STATE_IS_LIGHT_TYPE(a) ((a) == STATE_LIGHT_TYPE)
#define STATE_ACTIVELIGHT(a) (STATE_LIGHT_TYPE + 1 + (a)) #define STATE_ACTIVELIGHT(a) (STATE_LIGHT_TYPE + 1 + (a))
#define STATE_IS_ACTIVELIGHT(a) ((a) >= STATE_ACTIVELIGHT(0) && (a) < STATE_ACTIVELIGHT(MAX_ACTIVE_LIGHTS)) #define STATE_IS_ACTIVELIGHT(a) ((a) >= STATE_ACTIVELIGHT(0) && (a) < STATE_ACTIVELIGHT(WINED3D_MAX_ACTIVE_LIGHTS))
#define STATE_SCISSORRECT (STATE_ACTIVELIGHT(MAX_ACTIVE_LIGHTS - 1) + 1) #define STATE_SCISSORRECT (STATE_ACTIVELIGHT(WINED3D_MAX_ACTIVE_LIGHTS - 1) + 1)
#define STATE_IS_SCISSORRECT(a) ((a) == STATE_SCISSORRECT) #define STATE_IS_SCISSORRECT(a) ((a) == STATE_SCISSORRECT)
#define STATE_CLIPPLANE(a) (STATE_SCISSORRECT + 1 + (a)) #define STATE_CLIPPLANE(a) (STATE_SCISSORRECT + 1 + (a))
...@@ -2896,7 +2896,7 @@ struct wined3d_light_state ...@@ -2896,7 +2896,7 @@ struct wined3d_light_state
{ {
/* Light hashmap. Collisions are handled using linked lists. */ /* Light hashmap. Collisions are handled using linked lists. */
struct list light_map[LIGHTMAP_SIZE]; struct list light_map[LIGHTMAP_SIZE];
const struct wined3d_light_info *lights[MAX_ACTIVE_LIGHTS]; const struct wined3d_light_info *lights[WINED3D_MAX_ACTIVE_LIGHTS];
}; };
#define WINED3D_STATE_NO_REF 0x00000001 #define WINED3D_STATE_NO_REF 0x00000001
......
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