GLuint j;
struct gl_sampler_object *sampObj =
lookup_samplerobj_locked(ctx, samplers[i]);
-
+
if (sampObj) {
/* If the sampler is currently bound, unbind it. */
for (j = 0; j < ctx->Const.MaxCombinedTextureImageUnits; j++) {
return;
}
}
-
+
/* bind new sampler */
_mesa_bind_sampler(ctx, unit, sampObj);
}
* Check if a coordinate wrap mode is legal.
* \return GL_TRUE if legal, GL_FALSE otherwise
*/
-static GLboolean
+static GLboolean
validate_texture_wrap_mode(struct gl_context *ctx, GLenum wrap)
{
const struct gl_extensions * const e = &ctx->Extensions;
/* GL spec 'Data Conversions' section specifies that floating-point
* value in integer Get function is rounded to nearest integer
*/
- *params = IROUND(sampObj->MinLod);
+ *params = lroundf(sampObj->MinLod);
break;
case GL_TEXTURE_MAX_LOD:
/* GL spec 'Data Conversions' section specifies that floating-point
* value in integer Get function is rounded to nearest integer
*/
- *params = IROUND(sampObj->MaxLod);
+ *params = lroundf(sampObj->MaxLod);
break;
case GL_TEXTURE_LOD_BIAS:
/* GL spec 'Data Conversions' section specifies that floating-point
* value in integer Get function is rounded to nearest integer
*/
- *params = IROUND(sampObj->LodBias);
+ *params = lroundf(sampObj->LodBias);
break;
case GL_TEXTURE_COMPARE_MODE:
*params = sampObj->CompareMode;
/* GL spec 'Data Conversions' section specifies that floating-point
* value in integer Get function is rounded to nearest integer
*/
- *params = IROUND(sampObj->MaxAnisotropy);
+ *params = lroundf(sampObj->MaxAnisotropy);
break;
case GL_TEXTURE_BORDER_COLOR:
params[0] = FLOAT_TO_INT(sampObj->BorderColor.f[0]);