formatquery: use correct target check for IMAGE_FORMAT_COMPATIBILITY_TYPE
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 25 Oct 2017 12:35:36 +0000 (14:35 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Fri, 27 Oct 2017 13:04:03 +0000 (15:04 +0200)
commitfd011376cb3d7713297e057eafbd1d0ef1df3667
treedbd3c2559f9d70c020237569167ca0ca57333ebb
parent05a94a4dfc79f95d597dd6fc08eea4a947eb300c
formatquery: use correct target check for IMAGE_FORMAT_COMPATIBILITY_TYPE

From the spec:
   "IMAGE_FORMAT_COMPATIBILITY_TYPE: The matching criteria use for the
    resource when used as an image textures is returned in
    <params>. This is equivalent to calling GetTexParameter"

So we would need to return None for any target not supported by
GetTexParameter. By mistake, we were using the target check for
GetTexLevelParameter.

v2: fix typo (GetTextParameter vs GetTexParemeter) on comment (Illia Mirkin)

Reviewed-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/main/formatquery.c