diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2022-04-12 11:45:33 -0400 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-04-21 21:03:06 -0700 |
commit | c327d4441ce22eb8e6cf2c576f327f385b0069d1 (patch) | |
tree | a1ef731fe4cd60bc59c53a37189b0e81bb6ba11b | |
parent | 8b14b9dc4919c673f7026e46b67550cbff43377e (diff) |
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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15895>
(cherry picked from commit 2058ae7b430457dd5dcc2a2e7eaf742981bfbf4f)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | 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 668ef2b0e31..eb6dac39be0 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; |