Commit 8311ff32 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Take the texUnitMap into account when loading shader_glsl_load_psamplers().

parent 2256e06d
......@@ -90,8 +90,9 @@ static void shader_glsl_load_psamplers(
snprintf(sampler_name, sizeof(sampler_name), "Psampler%d", i);
name_loc = GL_EXTCALL(glGetUniformLocationARB(programId, sampler_name));
if (name_loc != -1) {
TRACE("Loading %s for texture %d\n", sampler_name, i);
GL_EXTCALL(glUniform1iARB(name_loc, i));
int mapped_unit = stateBlock->wineD3DDevice->texUnitMap[i];
TRACE("Loading %s for texture %d\n", sampler_name, mapped_unit);
GL_EXTCALL(glUniform1iARB(name_loc, mapped_unit));
checkGLcall("glUniform1iARB");
}
}
......
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