mesa/main/ff_frag: Use gl_texture_object::TargetIndex.
authorGustaw Smolarczyk <wielkiegie@gmail.com>
Thu, 30 Mar 2017 18:09:27 +0000 (20:09 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 8 Apr 2017 18:29:58 +0000 (20:29 +0200)
Instead of computing it once again using _mesa_tex_target_to_index.

Signed-off-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/ff_fragment_shader.cpp

index 717f39e9d3eb18f75f6895c01e0e829053a0363a..2b4d99c8791368debf5f39d5da144b9bc5941712 100644 (file)
@@ -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) &&