Mesa (master): mesa/program: Use sampler object state if present
Eric Anholt
anholt at kemper.freedesktop.org
Wed Aug 1 23:04:34 UTC 2012
Module: Mesa
Branch: master
Commit: ae58f9696c5f82c98767b3f244b2ad4b966905e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae58f9696c5f82c98767b3f244b2ad4b966905e5
Author: Pauli Nieminen <pauli.nieminen at linux.intel.com>
Date: Tue Jun 12 21:38:54 2012 +0300
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 <pauli.nieminen at linux.intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
---
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 3d13386..9121221 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;
More information about the mesa-commit
mailing list