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: 41e093fc98 ("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>
(cherry picked from commit 1a135bdd6ce39f155e92b881829d642664a5fcfd)
This commit is contained in:
Erik Faye-Lund 2022-09-20 10:12:50 +02:00 committed by Dylan Baker
parent eaf643f247
commit 33ccf9ff92
2 changed files with 2 additions and 1 deletions

View File

@ -1885,7 +1885,7 @@
"description": "mesa/st: always use normalized coords for samplers",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "41e093fc98c269279a100c3dd25ed911a7eeec58"
},

View File

@ -1782,6 +1782,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);