aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-11-22 08:51:58 +0100
committermarha <marha@users.sourceforge.net>2013-11-22 08:51:58 +0100
commit7dbaa1cffdf176f803f2c7069fb6810e16a86f72 (patch)
treee12bbf56a362758517fa9c26e46eca212448aca7 /mesalib/src/mesa/main/texparam.c
parent4887502815f54a96dce04c1f503f9e5f6ea7408a (diff)
parent697f071e3dcd3b01dba050d6c5316f2a23ee82f8 (diff)
downloadvcxsrv-7dbaa1cffdf176f803f2c7069fb6810e16a86f72.tar.gz
vcxsrv-7dbaa1cffdf176f803f2c7069fb6810e16a86f72.tar.bz2
vcxsrv-7dbaa1cffdf176f803f2c7069fb6810e16a86f72.zip
Merge remote-tracking branch 'origin/released'
* origin/released: libxtrans mesa git update 22 nov 2013
Diffstat (limited to 'mesalib/src/mesa/main/texparam.c')
-rw-r--r--mesalib/src/mesa/main/texparam.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/texparam.c b/mesalib/src/mesa/main/texparam.c
index d56b7d9d7..7092c630b 100644
--- a/mesalib/src/mesa/main/texparam.c
+++ b/mesalib/src/mesa/main/texparam.c
@@ -684,11 +684,8 @@ set_tex_parameterf(struct gl_context *ctx,
return GL_FALSE;
case GL_TEXTURE_LOD_BIAS:
- /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias.
- * It was removed in core-profile, and it has never existed in OpenGL
- * ES.
- */
- if (ctx->API != API_OPENGL_COMPAT)
+ /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias. */
+ if (_mesa_is_gles(ctx))
goto invalid_pname;
if (!target_allows_setting_sampler_parameters(texObj->Target))
@@ -1513,7 +1510,7 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
*params = (GLfloat) obj->DepthMode;
break;
case GL_TEXTURE_LOD_BIAS:
- if (ctx->API != API_OPENGL_COMPAT)
+ if (_mesa_is_gles(ctx))
goto invalid_pname;
*params = obj->Sampler.LodBias;
@@ -1701,10 +1698,13 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
*params = (GLint) obj->DepthMode;
break;
case GL_TEXTURE_LOD_BIAS:
- if (ctx->API != API_OPENGL_COMPAT)
+ if (_mesa_is_gles(ctx))
goto invalid_pname;
- *params = (GLint) obj->Sampler.LodBias;
+ /* GL spec 'Data Conversions' section specifies that floating-point
+ * value in integer Get function is rounded to nearest integer
+ */
+ *params = IROUND(obj->Sampler.LodBias);
break;
case GL_TEXTURE_CROP_RECT_OES:
if (ctx->API != API_OPENGLES || !ctx->Extensions.OES_draw_texture)