Mesa (main): mesa/st: set normalized coords for RECT samplers if rects are unsupported
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 14 23:56:55 UTC 2022
Module: Mesa
Branch: main
Commit: 2058ae7b430457dd5dcc2a2e7eaf742981bfbf4f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2058ae7b430457dd5dcc2a2e7eaf742981bfbf4f
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>
---
src/mesa/state_tracker/st_atom_sampler.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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