<p dir="ltr"><br>
On Jan 8, 2016 6:59 PM, "Ian Romanick" <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br>
><br>
> From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
><br>
> Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
> ---<br>
> src/mesa/main/samplerobj.c | 12 ++++++++++++<br>
> src/mesa/main/samplerobj.h | 5 +++++<br>
> 2 files changed, 17 insertions(+)<br>
><br>
> diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c<br>
> index 17b3400..3f48ab9f 100644<br>
> --- a/src/mesa/main/samplerobj.c<br>
> +++ b/src/mesa/main/samplerobj.c<br>
> @@ -509,6 +509,18 @@ set_sampler_wrap_r(struct gl_context *ctx, struct gl_sampler_object *samp,<br>
> return INVALID_PARAM;<br>
> }<br>
><br>
> +void<br>
> +_mesa_set_sampler_filters(struct gl_context *ctx,<br>
> + struct gl_sampler_object *samp,<br>
> + GLenum min_filter, GLenum mag_filter)<br>
> +{</p>
<p dir="ltr">Maybe add asserts like you did on the others?</p>
<p dir="ltr">> + if (samp->MinFilter == min_filter && samp->MagFilter == mag_filter)<br>
> + return;<br>
> +<br>
> + flush(ctx);<br>
> + samp->MinFilter = min_filter;<br>
> + samp->MagFilter = mag_filter;<br>
> +}<br>
><br>
> static GLuint<br>
> set_sampler_min_filter(struct gl_context *ctx, struct gl_sampler_object *samp,<br>
> diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h<br>
> index 1817c1a..c35052e 100644<br>
> --- a/src/mesa/main/samplerobj.h<br>
> +++ b/src/mesa/main/samplerobj.h<br>
> @@ -84,6 +84,11 @@ extern void<br>
> _mesa_set_sampler_wrap(struct gl_context *ctx, struct gl_sampler_object *samp,<br>
> GLenum s, GLenum t, GLenum r);<br>
><br>
> +extern void<br>
> +_mesa_set_sampler_filters(struct gl_context *ctx,<br>
> + struct gl_sampler_object *samp,<br>
> + GLenum min_filter, GLenum mag_filter);<br>
> +<br>
> void GLAPIENTRY<br>
> _mesa_GenSamplers(GLsizei count, GLuint *samplers);<br>
> void GLAPIENTRY<br>
> --<br>
> 2.5.0<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
><a href="mailto:mesa-dev@lists.freedesktop.org"> mesa-dev@lists.freedesktop.org</a><br>
><a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev"> http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>