I think you missed the one in _mesa_GetFloati_v. With that fixed, Reviewed-by: Ilia Mirkin <[email protected]>
On Sun, Dec 18, 2016 at 12:02 AM, Kenneth Graunke <[email protected]> wrote: > GetFloat of integer valued things is supposed to perform a simple > int -> float conversion. INT_TO_FLOAT is not that. Instead, it > converts [-2147483648, 2147483647] 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. > > Signed-off-by: Kenneth Graunke <[email protected]> > --- > src/mesa/main/get.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c > index ba02cb2..25444e7 100644 > --- a/src/mesa/main/get.c > +++ b/src/mesa/main/get.c > @@ -1564,7 +1564,7 @@ _mesa_GetFloatv(GLenum pname, GLfloat *params) > > case TYPE_INT_N: > for (i = 0; i < v.value_int_n.n; i++) > - params[i] = INT_TO_FLOAT(v.value_int_n.ints[i]); > + params[i] = (GLfloat) v.value_int_n.ints[i]; > break; > > case TYPE_INT64: > @@ -2536,7 +2536,7 @@ _mesa_GetDoublei_v(GLenum pname, GLuint index, GLdouble > *params) > > case TYPE_INT_N: > for (i = 0; i < v.value_int_n.n; i++) > - params[i] = (GLdouble) INT_TO_FLOAT(v.value_int_n.ints[i]); > + params[i] = (GLdouble) v.value_int_n.ints[i]; > break; > > case TYPE_INT64: > -- > 2.10.2 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
