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

View File

@@ -80,14 +80,14 @@ compare_mode
If set to PIPE_TEX_COMPARE_NONE, no comparison calculation is performed.
compare_func
The inequality operator used when compare_mode=1. One of PIPE_FUNC_x.
normalized_coords
If set, the incoming texture coordinates (nominally in the range [0,1])
will be scaled by the texture width, height, depth to compute texel
addresses. Otherwise, the texture coords are used as-is (they are not
scaled by the texture dimensions).
When normalized_coords=0, only a subset of the texture wrap modes are
allowed: PIPE_TEX_WRAP_CLAMP, PIPE_TEX_WRAP_CLAMP_TO_EDGE and
PIPE_TEX_WRAP_CLAMP_TO_BORDER.
unnormalized_coords
If set, incoming texture coordinates are used as-is to compute
texel addresses. When set, only a subset of the texture wrap
modes are allowed: PIPE_TEX_WRAP_CLAMP, PIPE_TEX_WRAP_CLAMP_TO_EDGE,
and PIPE_TEX_WRAP_CLAMP_TO_BORDER. If unset, the incoming texture
coordinates are assumed to be normalized to the range [0, 1],
and will be scaled by the texture dimensions to compute texel
addresses.
lod_bias
Bias factor which is added to the computed level of detail.
The normal level of detail is computed from the partial derivatives of