From ded57b5a4131a213d57f5a20d50b819b7a8924df Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 17 Oct 2012 08:04:15 +0200 Subject: pixman mesa git update 17 oct 2012 pixman: 6e56098c0338ce74228187e4c96fed1a66cb0956 mesa: 0199ff7fe323cf527ffacfdef3258ab85799dd13 --- mesalib/src/mesa/state_tracker/st_atom_sampler.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mesalib/src/mesa/state_tracker/st_atom_sampler.c') diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c index adcc7b505..3eba5b13c 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c +++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c @@ -34,6 +34,7 @@ #include "main/macros.h" #include "main/mtypes.h" +#include "main/glformats.h" #include "main/samplerobj.h" #include "main/texobj.h" @@ -172,12 +173,17 @@ convert_sampler(struct st_context *st, msamp->BorderColor.ui[2] || msamp->BorderColor.ui[3]) { struct gl_texture_image *teximg; + GLboolean is_integer = GL_FALSE; teximg = texobj->Image[0][texobj->BaseLevel]; - st_translate_color(msamp->BorderColor.f, - teximg ? teximg->_BaseFormat : GL_RGBA, - sampler->border_color.f); + if (teximg) { + is_integer = _mesa_is_enum_format_integer(teximg->InternalFormat); + } + + st_translate_color(&msamp->BorderColor, + &sampler->border_color, + teximg ? teximg->_BaseFormat : GL_RGBA, is_integer); } sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? -- cgit v1.2.3