diff options
author | Pauli Nieminen <[email protected]> | 2012-06-12 21:38:54 +0300 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-01 15:31:17 -0700 |
commit | ae58f9696c5f82c98767b3f244b2ad4b966905e5 (patch) | |
tree | 6c60b434a12fa138c5c3a1355ae5e80b710ba838 /src/mesa/program/prog_statevars.c | |
parent | cae76368523b2dd25f26069b9872a8993384fa57 (diff) |
mesa/program: Use sampler object state if present
CompareFailValue is part of Sampler state that needs to be read from
bound sampler object if present.
Signed-off-by: Pauli Nieminen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_statevars.c')
-rw-r--r-- | src/mesa/program/prog_statevars.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 3d133867423..91212218e7a 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -37,6 +37,7 @@ #include "main/fbobject.h" #include "prog_statevars.h" #include "prog_parameter.h" +#include "main/samplerobj.h" /** @@ -555,11 +556,13 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[], const int unit = (int) state[2]; const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current; + const struct gl_sampler_object *samp = + _mesa_get_samplerobj(ctx, unit); if (texObj) { value[0] = value[1] = value[2] = - value[3] = texObj->Sampler.CompareFailValue; + value[3] = samp->CompareFailValue; } } return; |