summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2022-09-20 10:12:50 +0200
committerMarge Bot <emma+marge@anholt.net>2022-09-22 11:37:10 +0000
commit1a135bdd6ce39f155e92b881829d642664a5fcfd (patch)
tree1e8e53459fd9a35541914a4f4cd7914a79ad32b3 /src/mesa/state_tracker/st_cb_texture.c
parent484205b7ebfc937821b7196d779d9c51fcb7d612 (diff)
mesa/st: always use normalized coords for samplers
Normalized samplers is the norm, and non-normalized samplers might cause some drivers and hardware to have to bend over backwards a bit. We're using TXF here anyway, so it doesn't really matter what we set this state to. So let's always use normalized samplers instead of always using non-normalized samplers. That makes things easier for everyone. Fixes: 41e093fc98c ("st/pbo: add a fast pbo download code-path") Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17708>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 48af25a1df6..8d0b911161b 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1829,6 +1829,7 @@ try_pbo_download(struct st_context *st,
struct pipe_sampler_view templ;
struct pipe_sampler_view *sampler_view;
struct pipe_sampler_state sampler = {0};
+ sampler.normalized_coords = true;
const struct pipe_sampler_state *samplers[1] = {&sampler};
unsigned level = texImage->TexObject->Attrib.MinLevel + texImage->Level;
unsigned max_layer = util_max_layer(texture, level);