mesa: add gl_coontext::ForceIntegerTexNearest
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 20 Apr 2020 12:17:53 +0000 (14:17 +0200)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 5 May 2020 07:40:29 +0000 (09:40 +0200)
commit12fb7d700861fb0af639fa21c1e3b65981ee81e4
treed5de2c24411787ee79efd3b19e7a612936ef9c46
parent90d9f9a37ed6a84292a96a247f70ffeb88a2ccde
mesa: add gl_coontext::ForceIntegerTexNearest

Some applications incorrectly use GL_LINEAR* values for integers texture.
copyimage.c already implemented a tolerance for such app in prepare_target_err.

This commit adds a boolean that will treat GL_LINEAR* filters as
GL_NEAREST for integer textures.

CC: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4647>
src/mesa/main/mtypes.h
src/mesa/main/texobj.h
src/mesa/main/texstate.c
src/mesa/main/texturebindless.c
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/swrast/s_texfilter.c