From f94eeaeb931c261da14dc079034e99cc5b0cc985 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 20 Sep 2022 10:12:50 +0200 Subject: [PATCH] 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: e7b95619596 ("gallium: implement compute pbo download") Reviewed-By: Mike Blumenkrantz Part-of: (cherry picked from commit 37733c100d61cd47ba6ba30bb6fa1e402dd88901) --- .pick_status.json | 2 +- src/mesa/state_tracker/st_pbo_compute.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 6407d07bdb3..a7ed5c3c179 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1876,7 +1876,7 @@ "description": "mesa/st: always use normalized coords for samplers", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "e7b95619596167025d26f07efb04dc5bfd5e9aee" }, diff --git a/src/mesa/state_tracker/st_pbo_compute.c b/src/mesa/state_tracker/st_pbo_compute.c index d88b444521a..ee37585df0c 100644 --- a/src/mesa/state_tracker/st_pbo_compute.c +++ b/src/mesa/state_tracker/st_pbo_compute.c @@ -835,6 +835,7 @@ download_texture_compute(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}; const struct util_format_description *desc = util_format_description(dst_format);