diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2022-10-05 16:20:27 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-10-10 10:20:02 +0000 |
commit | 55f6a2bb51a1fadcd68f9f09ccf4435a4e4ca269 (patch) | |
tree | 6025c1e2b46f6e35b3402d5c0106a70556341aa1 /src/gallium/drivers/i915 | |
parent | 4e7b9aaa066e0ea03dc408193211c423896e603c (diff) |
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>
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 74670ba7e0a..cb5db6208af 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -318,7 +318,7 @@ i915_create_sampler_state(struct pipe_context *pipe, (translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) | (translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT)); - if (sampler->normalized_coords) + if (!sampler->unnormalized_coords) cso->state[1] |= SS3_NORMALIZED_COORDS; { |