mesa/formatquery: support for IMAGE_FORMAT_COMPATIBILITY_TYPE
From arb_internalformat_query2 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 with <value>
set to IMAGE_FORMAT_COMPATIBILITY_TYPE."
Current implementation of GetTexParameter for this case returns a
field of a texture object, so the support of this pname was
implemented creating a temporal texture object and returning that
value.
It is worth to mention that right now that field is not reassigned
after initialization. So it is somehow hardcoded. An alternative
option would be return that value. That doesn't seems really scalable
though.
v2: use _mesa_has## instead of direct ctx->Extensions access (Nanley Chery)
Reviewed-by: Dave Airlie <airlied@redhat.com>