gallium: normalized_coords -> unnormalized_coords

A lot of code zero-initializes pipe_sampler_state, and sets the states
the non-zero fields manually. This means that normalized_coords is the
"default" setting.

However, setting normalized_coords to true isn't allways allowed, and
we'd need to check PIPE_CAP_TEXRECT first. So it's not really the ideal
default here. There's recently been found quite a bit of bugs in this
area, where the state-tracker didn't properly lower texrects.

Let's switch this around to avoid more bugs like this in the future.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18971>
This commit is contained in:
Erik Faye-Lund
2022-10-05 16:20:27 +02:00
committed by Marge Bot
parent 4e7b9aaa06
commit 55f6a2bb51
56 changed files with 54 additions and 80 deletions
+1 -1
View File
@@ -425,7 +425,7 @@ struct pipe_sampler_state
unsigned mag_img_filter:1; /**< PIPE_TEX_FILTER_x */
unsigned compare_mode:1; /**< PIPE_TEX_COMPARE_x */
unsigned compare_func:3; /**< PIPE_FUNC_x */
unsigned normalized_coords:1; /**< Are coords normalized to [0,1]? */
unsigned unnormalized_coords:1; /**< Are coords normalized to [0,1]? */
unsigned max_anisotropy:5;
unsigned seamless_cube_map:1;
unsigned border_color_is_integer:1;