[Mesa-dev] [PATCH 6/6] mesa: conversion from float in GetUniformi64v require rounding to nearest
Iago Toral Quiroga
itoral at igalia.com
Thu May 11 11:10:21 UTC 2017
As we do for all other cases of float/double conversions to integers.
---
src/mesa/main/uniform_query.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 25acc31..76b872d 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -575,7 +575,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 = IROUND64(src[sidx].f);
memcpy(&dst[didx].u, &tmp, sizeof(tmp));
break;
}
--
2.9.3
More information about the mesa-dev
mailing list