From 885012aab26ab293fe71f242d4379758a72c5ce0 Mon Sep 17 00:00:00 2001 From: Gustaw Smolarczyk Date: Thu, 30 Mar 2017 20:09:27 +0200 Subject: [PATCH] mesa/main/ff_frag: Use gl_texture_object::TargetIndex. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Instead of computing it once again using _mesa_tex_target_to_index. Signed-off-by: Gustaw Smolarczyk Signed-off-by: Marek Olšák --- src/mesa/main/ff_fragment_shader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 717f39e9..2b4d99c 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) && -- 2.7.4