Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/wined3d/adapter_gl.c | 2 +- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/shader.c | 2 +- dlls/wined3d/stateblock.c | 2 +- dlls/wined3d/wined3d_private.h | 16 ++++++++-------- 5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index c75b19eae3..acfed24b53 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -2870,7 +2870,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info, struct gl_info->limits.arb_ps_temps = 0;
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_CLIP_DISTANCES, &gl_max); - gl_info->limits.user_clip_distances = min(MAX_CLIP_DISTANCES, gl_max); + gl_info->limits.user_clip_distances = min(WINED3D_MAX_CLIP_DISTANCES, gl_max); TRACE("Clip plane support - max planes %d.\n", gl_max);
if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 1a24a662e8..660005f57e 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -257,7 +257,7 @@ struct glsl_shader_prog_link DWORD constant_update_mask; unsigned int constant_version; DWORD shader_controlled_clip_distances : 1; - DWORD clip_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */ + DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */ DWORD padding : 23; };
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 8faae3a31e..83a793d522 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -966,7 +966,7 @@ static HRESULT shader_calculate_clip_or_cull_distance_mask( /* Clip and cull distances are packed in 4 component registers. 0 and 1 are * the only allowed semantic indices. */ - if (e->semantic_idx >= MAX_CLIP_DISTANCES / 4) + if (e->semantic_idx >= WINED3D_MAX_CLIP_DISTANCES / 4) { *mask = 0; WARN("Invalid clip/cull distance index %u.\n", e->semantic_idx); diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 50b7135fb4..b8b02c8a33 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -218,7 +218,7 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states, stateblock_set_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1); for (i = 0; i < WINED3D_MAX_TEXTURES; ++i) states->textureState[i] = 0x3ffff; for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3ffe; - states->clipplane = (1u << MAX_CLIP_DISTANCES) - 1; + states->clipplane = (1u << WINED3D_MAX_CLIP_DISTANCES) - 1; states->pixelShaderConstantsB = 0xffff; states->pixelShaderConstantsI = 0xffff; states->vertexShaderConstantsB = 0xffff; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2fbcf1a522..07c6c6ce02 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -264,7 +264,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup #define WINED3D_MAX_VERTEX_SAMPLERS 4 #define WINED3D_MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS) #define WINED3D_MAX_ACTIVE_LIGHTS 8 -#define MAX_CLIP_DISTANCES 8 +#define WINED3D_MAX_CLIP_DISTANCES 8 #define MAX_CONSTANT_BUFFERS 15 #define MAX_SAMPLER_OBJECTS 16 #define MAX_SHADER_RESOURCE_VIEWS 128 @@ -1009,8 +1009,8 @@ struct wined3d_shader_reg_maps DWORD uav_read_mask : 8; /* MAX_UNORDERED_ACCESS_VIEWS, 8 */ DWORD uav_counter_mask : 8; /* MAX_UNORDERED_ACCESS_VIEWS, 8 */
- DWORD clip_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */ - DWORD cull_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */ + DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */ + DWORD cull_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */ DWORD usesnrm : 1; DWORD vpos : 1; DWORD usesdsx : 1; @@ -1621,9 +1621,9 @@ enum wined3d_pipeline #define STATE_IS_SCISSORRECT(a) ((a) == STATE_SCISSORRECT)
#define STATE_CLIPPLANE(a) (STATE_SCISSORRECT + 1 + (a)) -#define STATE_IS_CLIPPLANE(a) ((a) >= STATE_CLIPPLANE(0) && (a) <= STATE_CLIPPLANE(MAX_CLIP_DISTANCES - 1)) +#define STATE_IS_CLIPPLANE(a) ((a) >= STATE_CLIPPLANE(0) && (a) <= STATE_CLIPPLANE(WINED3D_MAX_CLIP_DISTANCES - 1))
-#define STATE_MATERIAL (STATE_CLIPPLANE(MAX_CLIP_DISTANCES)) +#define STATE_MATERIAL (STATE_CLIPPLANE(WINED3D_MAX_CLIP_DISTANCES)) #define STATE_IS_MATERIAL(a) ((a) == STATE_MATERIAL)
#define STATE_RASTERIZER (STATE_MATERIAL + 1) @@ -1921,7 +1921,7 @@ struct wined3d_context DWORD transform_feedback_active : 1; DWORD transform_feedback_paused : 1; DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */ - DWORD clip_distance_mask : 8; /* MAX_CLIP_DISTANCES, 8 */ + DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */ DWORD num_untracked_materials : 2; /* Max value 2 */ DWORD padding : 7;
@@ -2941,7 +2941,7 @@ struct wined3d_state DWORD texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
struct wined3d_matrix transforms[HIGHEST_TRANSFORMSTATE + 1]; - struct wined3d_vec4 clip_planes[MAX_CLIP_DISTANCES]; + struct wined3d_vec4 clip_planes[WINED3D_MAX_CLIP_DISTANCES]; struct wined3d_material material; struct wined3d_viewport viewports[WINED3D_MAX_VIEWPORTS]; unsigned int viewport_count; @@ -3003,7 +3003,7 @@ struct wined3d_stateblock_state DWORD texture_states[WINED3D_MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
struct wined3d_matrix transforms[HIGHEST_TRANSFORMSTATE + 1]; - struct wined3d_vec4 clip_planes[MAX_CLIP_DISTANCES]; + struct wined3d_vec4 clip_planes[WINED3D_MAX_CLIP_DISTANCES]; struct wined3d_material material; struct wined3d_viewport viewport; RECT scissor_rect;