From: Gustaw Smolarczyk Date: Thu, 30 Mar 2017 18:09:27 +0000 (+0200) Subject: mesa/main/ff_frag: Use gl_texture_object::TargetIndex. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=885012aab26ab293fe71f242d4379758a72c5ce0;p=mesa.git mesa/main/ff_frag: Use gl_texture_object::TargetIndex. Instead of computing it once again using _mesa_tex_target_to_index. Signed-off-by: Gustaw Smolarczyk Signed-off-by: Marek Olšák --- diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 717f39e9d3e..2b4d99c8791 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -414,8 +414,7 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key ) key->unit[i].enabled = 1; inputs_referenced |= VARYING_BIT_TEX(i); - key->unit[i].source_index = _mesa_tex_target_to_index(ctx, - texObj->Target); + key->unit[i].source_index = texObj->TargetIndex; key->unit[i].shadow = ((samp->CompareMode == GL_COMPARE_R_TO_TEXTURE) &&