diff options
author | marha <marha@users.sourceforge.net> | 2012-10-17 08:07:33 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-10-17 08:07:33 +0200 |
commit | 856fbbaf1e53303d8307bfae1761f1ba96871f1e (patch) | |
tree | e029665439ddbccfb253271a5f5290d72c2b2168 /mesalib/src/mesa/state_tracker/st_atom_sampler.c | |
parent | f15a40afaf6d1b3a4841d25631f947da1b289f89 (diff) | |
parent | ded57b5a4131a213d57f5a20d50b819b7a8924df (diff) | |
download | vcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.tar.gz vcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.tar.bz2 vcxsrv-856fbbaf1e53303d8307bfae1761f1ba96871f1e.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
pixman mesa git update 17 oct 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_sampler.c | 12 |
1 files changed, 9 insertions, 3 deletions
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 ? |