From: Józef Kucia Subject: [PATCH 8/8] wined3d: Use fixed function pipeline texture unit limit in tex_coordindex(). Message-Id: <20170309090310.13755-8-jkucia@codeweavers.com> Date: Thu, 9 Mar 2017 10:03:10 +0100 In-Reply-To: <20170309090310.13755-1-jkucia@codeweavers.com> References: <20170309090310.13755-1-jkucia@codeweavers.com> Signed-off-by: Józef Kucia --- dlls/wined3d/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 49ff9dc..12ba19d 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -3322,12 +3322,12 @@ static void tex_coordindex(struct wined3d_context *context, const struct wined3d TRACE("No texture unit mapped to stage %d. Skipping texture coordinates.\n", stage); return; } - - if (mapped_stage >= min(gl_info->limits.samplers[WINED3D_SHADER_TYPE_PIXEL], MAX_FRAGMENT_SAMPLERS)) + if (mapped_stage >= gl_info->limits.textures) { - WARN("stage %u not mapped to a valid texture unit (%u)\n", stage, mapped_stage); + WARN("Stage %u not mapped to a valid texture unit (%u).\n", stage, mapped_stage); return; } + context_active_texture(context, gl_info, mapped_stage); /* Values 0-7 are indexes into the FVF tex coords - See comments in DrawPrimitive -- 2.10.2