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>
This commit is contained in:
Mike Blumenkrantz 2022-04-12 11:45:33 -04:00 committed by Marge Bot
parent 5b0634d735
commit 2058ae7b43

View file

@ -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;