[Mesa-dev] [PATCH 08/14] mesa/main/ff_frag: Use gl_texture_object::TargetIndex.

Gustaw Smolarczyk wielkiegie at gmail.com
Thu Mar 30 18:09:27 UTC 2017


Instead of computing it once again using _mesa_tex_target_to_index.

Signed-off-by: Gustaw Smolarczyk <wielkiegie at gmail.com>
---
 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 717f39e9d3..2b4d99c879 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.12.1



More information about the mesa-dev mailing list