From 8a1e746ffb98b2e4679f518dc0f6a3f30470cde7 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Wed, 20 Feb 2019 14:53:59 -0600 Subject: [PATCH] wined3d: Rename MAX_VERTEX_SAMPLERS to WINED3D_MAX_VERTEX_SAMPLERS. Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/context.c | 10 +++++----- dlls/wined3d/wined3d_private.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 58ecc879c9c..42dcd2e49aa 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2036,12 +2036,12 @@ BOOL wined3d_adapter_gl_create_context(struct wined3d_context *context, } wined3d_gl_limits_get_texture_unit_range(&gl_info->limits, WINED3D_SHADER_TYPE_VERTEX, &base, &count); - if (base + MAX_VERTEX_SAMPLERS > ARRAY_SIZE(context->rev_tex_unit_map)) + if (base + WINED3D_MAX_VERTEX_SAMPLERS > ARRAY_SIZE(context->rev_tex_unit_map)) { ERR("Unexpected texture unit base index %u.\n", base); return FALSE; } - for (i = 0; i < min(count, MAX_VERTEX_SAMPLERS); ++i) + for (i = 0; i < min(count, WINED3D_MAX_VERTEX_SAMPLERS); ++i) { context->tex_unit_map[WINED3D_MAX_FRAGMENT_SAMPLERS + i] = base + i; context->rev_tex_unit_map[base + i] = WINED3D_MAX_FRAGMENT_SAMPLERS + i; @@ -2368,7 +2368,7 @@ const DWORD *context_get_tex_unit_mapping(const struct wined3d_context *context, break; case WINED3D_SHADER_TYPE_VERTEX: *base = WINED3D_MAX_FRAGMENT_SAMPLERS; - *count = MAX_VERTEX_SAMPLERS; + *count = WINED3D_MAX_VERTEX_SAMPLERS; break; default: ERR("Unhandled shader type %#x.\n", shader_version->type); @@ -3416,7 +3416,7 @@ static void context_map_vsamplers(struct wined3d_context *context, BOOL ps, cons if (ps) ps_resource_info = state->shader[WINED3D_SHADER_TYPE_PIXEL]->reg_maps.resource_info; - for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) + for (i = 0; i < WINED3D_MAX_VERTEX_SAMPLERS; ++i) { DWORD vsampler_idx = i + WINED3D_MAX_FRAGMENT_SAMPLERS; if (vs_resource_info[i].type) @@ -3729,7 +3729,7 @@ static void context_preload_textures(struct wined3d_context *context, const stru if (use_vs(state)) { - for (i = 0; i < MAX_VERTEX_SAMPLERS; ++i) + for (i = 0; i < WINED3D_MAX_VERTEX_SAMPLERS; ++i) { if (state->shader[WINED3D_SHADER_TYPE_VERTEX]->reg_maps.resource_info[i].type) context_preload_texture(context, state, WINED3D_MAX_FRAGMENT_SAMPLERS + i); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 6d52791fc01..770ba5f1acd 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -261,8 +261,8 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup #define WINED3D_MAX_STREAMS 16 #define WINED3D_MAX_TEXTURES 8 #define WINED3D_MAX_FRAGMENT_SAMPLERS 16 -#define MAX_VERTEX_SAMPLERS 4 -#define MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + MAX_VERTEX_SAMPLERS) +#define WINED3D_MAX_VERTEX_SAMPLERS 4 +#define MAX_COMBINED_SAMPLERS (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS) #define MAX_ACTIVE_LIGHTS 8 #define MAX_CLIP_DISTANCES 8 #define MAX_CONSTANT_BUFFERS 15 @@ -1996,7 +1996,7 @@ struct wined3d_context GLuint blit_vbo; DWORD tex_unit_map[MAX_COMBINED_SAMPLERS]; - DWORD rev_tex_unit_map[MAX_GL_FRAGMENT_SAMPLERS + MAX_VERTEX_SAMPLERS]; + DWORD rev_tex_unit_map[MAX_GL_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS]; /* Extension emulation */ GLint gl_fog_source;