diff options
author | Anuj Phogat <[email protected]> | 2013-01-07 10:30:11 +0530 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-01-15 15:09:37 -0800 |
commit | d0ce8d6ceb5f597e9cb132e6395bce8fbd51b58e (patch) | |
tree | d67a7e69cf39be9dc9b4f504b706de2f737bbc19 /src/mesa/main/fbobject.c | |
parent | bed997dabaada5e7c8081db08f93a6f1b5932e8b (diff) |
mesa: Round float param in glTexparameterf() to nearest integer
OpenGL 4.2 specification suggests rounding the float data to nearest
integer when the type of internal state is integer. Out of range floats
should be clamped to {INT_MIN, INT_MAX}. This is not specified anywhere
in gl/gles spec but below test expects this behavior. This patch makes
gles3 conformance sgis_texture_lod_basic_getter.test pass.
A GL spec bug will be raised to include clamping of out of range floats.
V2: Round float to nearest integer for all cases where
_mesa_Texparameterf() converts float param to int. Use the same block of
float to int conversion code for GL_TEXTURE_SWIZZLE_{R,G,B,A}_EXT cases
as well.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
0 files changed, 0 insertions, 0 deletions