From 10e71d5c9a4760af0d2593c6c48dced71f549c1b Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 25 Jan 2021 15:31:15 -0500 Subject: [PATCH] mesa/st: add pipe_sampler_state::border_color_is_integer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit some drivers need to know whether the border color format is integer, so this allows disambiguation between samplers based on format types Reviewed-by: Eric Anholt Reviewed-by: Marek Olšák Part-of: --- src/gallium/include/pipe/p_state.h | 1 + src/mesa/state_tracker/st_atom_sampler.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index c1bdf5e..56d863e 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -412,6 +412,7 @@ struct pipe_sampler_state unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */ unsigned max_anisotropy:5; unsigned seamless_cube_map:1; + unsigned border_color_is_integer:1; float lod_bias; /**< LOD/lambda bias */ float min_lod, max_lod; /**< LOD clamp range, after bias */ union pipe_color_union border_color; diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index a2af3a7..7416de3 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -202,6 +202,7 @@ st_convert_sampler(const struct st_context *st, &sampler->border_color, texBaseFormat, is_integer); } + sampler->border_color_is_integer = is_integer; } sampler->max_anisotropy = (msamp->Attrib.MaxAnisotropy == 1.0 ? -- 2.7.4