mesa/get: Make GetFloat/GetDouble of TYPE_INT_N not normalize things.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 18 Dec 2016 03:47:38 +0000 (19:47 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Dec 2016 19:33:40 +0000 (11:33 -0800)
commit78a391ed8311fc5215347f8775bf0aa29568b78d
treef63719ece1ba92b271dfb77c029a717cefcef730
parent52098fada7e965479490045684b9897c623f5f76
mesa/get: Make GetFloat/GetDouble of TYPE_INT_N not normalize things.

GetFloat of integer valued things is supposed to perform a simple
int -> float conversion.  INT_TO_FLOAT is not that.  Instead, it
converts [-21474836482147483647] to a normalized [-1.0, 1.0] float.

This is only used for COMPRESSED_TEXTURE_FORMATS, which nobody in
their right mind would try and access via glGetFloat(), but we may
as well fix it.

Found by inspection.

v2: Gotta catch 'em all (fix another case of this caught by Ilia)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/main/get.c