mesa/formatquery: Added INTERNALFORMAT_{X}_{SIZE,TYPE} <pname> queries
From the ARB_internalformat_query2 spec:
"- INTERNALFORMAT_RED_SIZE
- INTERNALFORMAT_GREEN_SIZE
- INTERNALFORMAT_BLUE_SIZE
- INTERNALFORMAT_ALPHA_SIZE
- INTERNALFORMAT_DEPTH_SIZE
- INTERNALFORMAT_STENCIL_SIZE
- INTERNALFORMAT_SHARED_SIZE
For uncompressed internal formats, queries of these values return the
actual resolutions that would be used for storing image array components
for the resource.
For compressed internal formats, the resolutions returned specify the
component resolution of an uncompressed internal format that produces
an image of roughly the same quality as the compressed algorithm.
For textures this query will return the same information as querying
GetTexLevelParameter{if}v for TEXTURE_*_SIZE would return.
If the internal format is unsupported, or if a particular component is
not present in the format, 0 is written to <params>.
- INTERNALFORMAT_RED_TYPE
- INTERNALFORMAT_GREEN_TYPE
- INTERNALFORMAT_BLUE_TYPE
- INTERNALFORMAT_ALPHA_TYPE
- INTERNALFORMAT_DEPTH_TYPE
- INTERNALFORMAT_STENCIL_TYPE
For uncompressed internal formats, queries for these values return the
data type used to store the component.
For compressed internal formats the types returned specify how components
are interpreted after decompression.
For textures this query returns the same information as querying
GetTexLevelParameter{if}v for TEXTURE_*TYPE would return.
Possible values return include, NONE, SIGNED_NORMALIZED,
UNSIGNED_NORMALIZED, FLOAT, INT, UNSIGNED_INT, representing missing,
signed normalized fixed point, unsigned normalized fixed point,
floating-point, signed unnormalized integer and unsigned unnormalized
integer components. NONE is returned for all component types if the
format is unsupported."
Reviewed-by: Dave Airlie <airlied@redhat.com>