Mesa (staging/22.0): mesa/st: set normalized coords for RECT samplers if rects are unsupported
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 20:48:23 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 6ca28bb0eafe1758e8be01e3843fd4d8e08123f2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6ca28bb0eafe1758e8be01e3843fd4d8e08123f2
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Apr 12 11:45:33 2022 -0400
mesa/st: set normalized coords for RECT samplers if rects are unsupported
the shaders will never see these, so set the expected value for 2D
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15895>
(cherry picked from commit 2058ae7b430457dd5dcc2a2e7eaf742981bfbf4f)
---
.pick_status.json | 2 +-
src/mesa/state_tracker/st_atom_sampler.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 56420b64ed6..20d9646cf90 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1948,7 +1948,7 @@
"description": "mesa/st: set normalized coords for RECT samplers if rects are unsupported",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"because_sha": null
},
{
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c
index 7f5a9a0ff0a..cdf267f385c 100644
--- a/src/mesa/state_tracker/st_atom_sampler.c
+++ b/src/mesa/state_tracker/st_atom_sampler.c
@@ -72,7 +72,7 @@ st_convert_sampler(const struct st_context *st,
sampler->mag_img_filter = PIPE_TEX_FILTER_NEAREST;
}
- if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB)
+ if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB || st->lower_rect_tex)
sampler->normalized_coords = 1;
sampler->lod_bias += tex_unit_lod_bias;
More information about the mesa-commit
mailing list