aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/ff_fragment_shader.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-03 09:39:10 +0200
committermarha <marha@users.sourceforge.net>2012-08-03 09:39:10 +0200
commite158f8fc4a9cf2f884d156ff2dfc0870facfbcba (patch)
tree9642a988d6674f27d6971ec2be7e2cdacc784862 /mesalib/src/mesa/main/ff_fragment_shader.cpp
parentebfd1ae8f80dd16f99f9ef89c28a06f809d07f8d (diff)
parent18e75aa6ae27a6e44d93babd96afbbe0cd6077c8 (diff)
downloadvcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.tar.gz
vcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.tar.bz2
vcxsrv-e158f8fc4a9cf2f884d156ff2dfc0870facfbcba.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/ff_fragment_shader.cpp')
-rw-r--r--mesalib/src/mesa/main/ff_fragment_shader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp
index 0233f3802..f743ce109 100644
--- a/mesalib/src/mesa/main/ff_fragment_shader.cpp
+++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp
@@ -33,6 +33,7 @@ extern "C" {
#include "mtypes.h"
#include "main/uniforms.h"
#include "main/macros.h"
+#include "main/samplerobj.h"
#include "program/program.h"
#include "program/prog_parameter.h"
#include "program/prog_cache.h"
@@ -428,11 +429,13 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[i];
const struct gl_texture_object *texObj = texUnit->_Current;
const struct gl_tex_env_combine_state *comb = texUnit->_CurrentCombine;
+ const struct gl_sampler_object *samp;
GLenum format;
if (!texUnit->_ReallyEnabled || !texUnit->Enabled)
continue;
+ samp = _mesa_get_samplerobj(ctx, i);
format = texObj->Image[0][texObj->BaseLevel]->_BaseFormat;
key->unit[i].enabled = 1;
@@ -444,7 +447,7 @@ static GLuint make_state_key( struct gl_context *ctx, struct state_key *key )
translate_tex_src_bit(texUnit->_ReallyEnabled);
key->unit[i].shadow =
- ((texObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE) &&
+ ((samp->CompareMode == GL_COMPARE_R_TO_TEXTURE) &&
((format == GL_DEPTH_COMPONENT) ||
(format == GL_DEPTH_STENCIL_EXT)));