[Mesa-dev] [PATCH 14/21] 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.niemi...@linux.intel.com --- src/mesa/program/prog_statevars.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 98ab9d0..7ab5773 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -36,6 +36,7 @@ #include main/mtypes.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; -- 1.7.9.5 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 14/21] mesa/program: Use sampler object state if present
On 06/11/2012 12:59 AM, Pauli Nieminen wrote: CompareFailValue is part of Sampler state that needs to be read from bound sampler object if present. Signed-off-by: Pauli Nieminenpauli.niemi...@linux.intel.com --- src/mesa/program/prog_statevars.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c index 98ab9d0..7ab5773 100644 --- a/src/mesa/program/prog_statevars.c +++ b/src/mesa/program/prog_statevars.c @@ -36,6 +36,7 @@ #include main/mtypes.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; Reviewed-by: Brian Paul bri...@vmware.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev