Lines Matching refs:clamp
1247 // clamp v to [0,limit).
1248 SI F clamp(F v, F limit) {
1256 x = clamp(x, ctx->width);
1257 y = clamp(y, ctx->height);
1267 // [0,1] float may be out of [0,1] range. Unorms cannot represent that, so we must clamp.
1419 BLEND_MODE(plus_) { return min(s + d, 1.0f); } // We can clamp to either 1 or sa.
1697 // Even repeat and mirror funnel through a clamp to handle bad inputs like +Inf, NaN.
2312 // The gather stages will hard clamp the output of these stages to [0,limit)...
2709 // The ix_and_ptr() calls in sample() will clamp tile()'s output, so no need to clamp here.
2782 // A specialized fused image shader for clamp-x, clamp-y, non-sRGB sampling.
2802 // ix_and_ptr() will clamp to the image's bounds for us.
2824 // A specialized fused image shader for clamp-x, clamp-y, non-sRGB sampling.
2853 // ix_and_ptr() will clamp to the image's bounds for us.
3969 // Even repeat and mirror funnel through a clamp to handle bad inputs like +Inf, NaN.