summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-23 17:20:53 -0700
committerEric Anholt <[email protected]>2014-04-30 14:33:20 -0700
commitcef82a64bdd90c8562325afd69fdf8b9a80ddb2f (patch)
tree4ea27b3b43a69c1e99c79bb3f54450caac4d0b3a /src
parent07b94c99a73481d08b285474db22106de1ca89fd (diff)
mesa: Drop _ReallyEnabled usage from ff_fragment_shader.
Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/ff_fragment_shader.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index f1ef38efa4c..605f3713e7c 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -42,6 +42,7 @@ extern "C" {
#include "program/prog_statevars.h"
#include "program/programopt.h"
#include "texenvprogram.h"
+#include "texobj.h"
}
#include "main/uniforms.h"
#include "../glsl/glsl_types.h"
@@ -290,18 +291,6 @@ need_saturate( GLuint mode )
}
}
-
-
-/**
- * Translate TEXTURE_x_BIT to TEXTURE_x_INDEX.
- */
-static GLuint translate_tex_src_bit( GLbitfield bit )
-{
- ASSERT(bit);
- return ffs(bit) - 1;
-}
-
-
#define VERT_BIT_TEX_ANY (0xff << VERT_ATTRIB_TEX0)
/**
@@ -441,8 +430,8 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
key->nr_enabled_units = i + 1;
inputs_referenced |= VARYING_BIT_TEX(i);
- key->unit[i].source_index =
- translate_tex_src_bit(texUnit->_ReallyEnabled);
+ key->unit[i].source_index = _mesa_tex_target_to_index(ctx,
+ texObj->Target);
key->unit[i].shadow =
((samp->CompareMode == GL_COMPARE_R_TO_TEXTURE) &&