Module: Mesa Branch: master Commit: eff11b5a4ac41e3a8a626a6445e63ab0322db351 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eff11b5a4ac41e3a8a626a6445e63ab0322db351
Author: Brian Paul <bri...@vmware.com> Date: Fri Dec 13 09:26:24 2013 -0700 st/mesa: simplify integer texture check Just use the gl_texture_object::_IsInteger field instead of computing it from scratch. Reviewed-by: Roland Scheidegger <srol...@vmware.com> --- src/mesa/state_tracker/st_atom_sampler.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 302e129..989e42c 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -170,21 +170,18 @@ convert_sampler(struct st_context *st, assert(sampler->min_lod <= sampler->max_lod); } + /* For non-black borders... */ if (msamp->BorderColor.ui[0] || msamp->BorderColor.ui[1] || msamp->BorderColor.ui[2] || msamp->BorderColor.ui[3]) { struct st_texture_object *stobj = st_texture_object(texobj); struct gl_texture_image *teximg; - GLboolean is_integer = GL_FALSE; + const GLboolean is_integer = texobj->_IsIntegerFormat; union pipe_color_union border_color; teximg = texobj->Image[0][texobj->BaseLevel]; - if (teximg) { - is_integer = _mesa_is_enum_format_integer(teximg->InternalFormat); - } - if (st->apply_texture_swizzle_to_border_color && stobj->sampler_view) { const unsigned char swz[4] = { _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit