mesa/formatquery: added FILTER pname support
authorAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 22 Dec 2015 19:06:19 +0000 (20:06 +0100)
committerEduardo Lima Mitev <elima@igalia.com>
Thu, 3 Mar 2016 14:14:07 +0000 (15:14 +0100)
commit8d7696f6380c38085029fff0eb00c3c18ea8e017
tree414468c2a80f3de581164458cdfde7e2045f5957
parenta8736a2567057c0cb3cdd673743d9cc8b562b288
mesa/formatquery: added FILTER pname support

It discards out the targets and internalformats that explicitly
mention (per-spec) that doesn't support filter types other than
NEAREST or NEAREST_MIPMAP_NEAREST. Those are:

  * Texture buffers target
  * Multisample targets
  * Any integer internalformat

For the case of multisample targets, it was used the existing method
_mesa_target_allows_setting_sampler_parameter. This would scalate
better in the future if new targets appear that doesn't allow to
set sampler parameters.

We consider RENDERBUFFER to support LINEAR filters, because although
it doesn't support this filter for sampling, you can set LINEAR
on a blit operation using glBlitFramebuffer.

Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/main/formatquery.c