mesa/st: add pipe_sampler_state::border_color_is_integer

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 <eric@anholt.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8756>
This commit is contained in:
Mike Blumenkrantz
2021-01-25 15:31:15 -05:00
committed by Marge Bot
parent b154a4154b
commit 10e71d5c9a
2 changed files with 2 additions and 0 deletions

View File

@@ -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;

View File

@@ -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 ?