mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
mesa/main: conversion from float in GetUniformi64v requires rounding to nearest
As we do for all other cases of float/double conversions to integers. v2: use round() instead of IROUND() macros (Iago) Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
parent
c333082483
commit
1356b42284
1 changed files with 1 additions and 1 deletions
|
|
@ -576,7 +576,7 @@ _mesa_get_uniform(struct gl_context *ctx, GLuint program, GLint location,
|
|||
break;
|
||||
}
|
||||
case GLSL_TYPE_FLOAT: {
|
||||
int64_t tmp = src[sidx].f;
|
||||
int64_t tmp = (int64_t) roundf(src[sidx].f);
|
||||
memcpy(&dst[didx].u, &tmp, sizeof(tmp));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue