Commit b1a071f5 by Alexis Hetu Committed by Alexis Hétu

LOD should be rounded to int

The queries should round, rather than truncate, LODs to int. Bug 20724899 Change-Id: I86ddc724545abb80687eb5132cdf8ddd410ee2d1 Reviewed-on: https://swiftshader-review.googlesource.com/3638Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 8eada888
...@@ -3887,14 +3887,14 @@ void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) ...@@ -3887,14 +3887,14 @@ void GetTexParameteriv(GLenum target, GLenum pname, GLint* params)
case GL_TEXTURE_MAX_LOD: case GL_TEXTURE_MAX_LOD:
if(clientVersion >= 3) if(clientVersion >= 3)
{ {
*params = (GLint)texture->getMaxLOD(); *params = (GLint)roundf(texture->getMaxLOD());
break; break;
} }
else return error(GL_INVALID_ENUM); else return error(GL_INVALID_ENUM);
case GL_TEXTURE_MIN_LOD: case GL_TEXTURE_MIN_LOD:
if(clientVersion >= 3) if(clientVersion >= 3)
{ {
*params = (GLint)texture->getMinLOD(); *params = (GLint)roundf(texture->getMinLOD());
break; break;
} }
else return error(GL_INVALID_ENUM); else return error(GL_INVALID_ENUM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment