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-20 21:44:49 -0700 |
commit | 5f5c562f0054806737648d7671dc9f05bba4d22a (patch) | |
tree | 7d29591565f553e0c902dc9ca073b517722f5d30 | |
parent | 653b560413fa90b0fa851538f303d3af367d6c0c (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 b2113ded6fc..f060bf152ee 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1804,7 +1804,7 @@ "description": "mesa/st: set normalized coords for RECT samplers if rects are unsupported", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "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; |