mesa/st, zink: force nearest-filtering for FP32 / integer textures
OpenGL 3.0 requires ARB_texture_float
, which technically speaking
requires linear-filtering support for FP32 textures. However, because a
lot of early implementations just ignore this and does nearest filtering
instead due to lack of hardware features for this, this functionality
was never added to the OpenGL CTS.
The result is that FP32 is a feature that is required on paper, but is unreliable to be used by applications in practice. This is mostly fine; for most filterable use-cases (e.g colors), FP16 is fine and saves a bunch of bandwidth, and for cases where you really need the extra bits (depth-reads etc), filtering is usually not what's wanted.
This MR fixes things up a bit for Zink, for two reasons:
- We forward the filtering modes verbatim from the sampler state.
That's incorrect for integer textures, when the
force_integer_tex_nearest
DRI-conf is in use. - We always report
PIPE_CAP_TEXTURE_FLOAT_LINEAR
as supported, even when linear filtering isn't. This makes us do the wrong thing for FP32, similar to for integer textures.
Edited by Erik Faye-Lund