/third_party/mesa3d/src/panfrost/bifrost/test/ |
H A D | test-optimizer.cpp | 95 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 98 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 103 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 106 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 111 I->clamp = BI_CLAMP_CLAMP_0_INF; in TEST_F() 114 I->clamp = BI_CLAMP_CLAMP_0_INF; in TEST_F() 122 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 125 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 130 I->clamp = BI_CLAMP_CLAMP_0_1; in TEST_F() 133 I->clamp in TEST_F() [all...] |
/third_party/skia/modules/canvaskit/ |
H A D | color.js | 15 return CanvasKit.Color4f(clamp(r)/255, clamp(g)/255, clamp(b)/255, a); 28 return (((clamp(a) << 24) | (clamp(r) << 16) | (clamp(g) << 8) | (clamp(b) << 0) 152 return ((clamp(c[3]*255) << 24) | (clamp(c[0]*255) << 16) | (clamp( 193 function clamp(c) { global() function [all...] |
/third_party/skia/src/core/ |
H A D | SkColorFilter_Matrix.cpp | 34 SkColorFilter_Matrix::SkColorFilter_Matrix(const float array[20], Domain domain, Clamp clamp) in SkColorFilter_Matrix() argument 37 , fClamp(clamp) { in SkColorFilter_Matrix() 67 Clamp clamp = buffer.isVersionLT(SkPicturePriv::kUnclampedMatrixColorFilter) in CreateProc() local 70 return is_rgba ? SkColorFilters::Matrix(matrix, clamp) in CreateProc() 202 // Convert HSLA -> RGBA (including clamp and premul). 264 SkColorFilters::Clamp clamp) { in MakeMatrix() 268 return sk_make_sp<SkColorFilter_Matrix>(array, domain, clamp); in MakeMatrix() 271 sk_sp<SkColorFilter> SkColorFilters::Matrix(const float array[20], Clamp clamp) { in Matrix() argument 272 return MakeMatrix(array, SkColorFilter_Matrix::Domain::kRGBA, clamp); in Matrix() 275 sk_sp<SkColorFilter> SkColorFilters::Matrix(const SkColorMatrix& cm, Clamp clamp) { in Matrix() argument 262 MakeMatrix(const float array[20], SkColorFilter_Matrix::Domain domain, SkColorFilters::Clamp clamp) MakeMatrix() argument [all...] |
H A D | SkBitmapProcState_matrixProcs.cpp | 55 // The clamp routines may try to fall into one of these unclamped decal fast-paths. 56 // (Only clamp works in the right coordinate space to check for decal.) 142 // used when both tilex and tiley are clamp 145 // If we're already scaled up to by max like clamp/decal, in extract_low_bits_clamp_clamp() 150 //used when one of tilex and tiley is not clamp 246 static unsigned clamp(SkFixed fx, int max) { 251 nofilter_scale <clamp, clamp, true>, filter_scale <clamp, clamp, extract_low_bits_clamp_clam [all...] |
/third_party/vk-gl-cts/framework/common/ |
H A D | tcuTexCompareVerifier.cpp | 66 const float cmpValue = (clampValues) ? (de::clamp(cmpValue_, 0.0f, 1.0f)) : (cmpValue_); in execCompare() 67 const float cmpReference = (clampValues) ? (de::clamp(cmpReference_, 0.0f, 1.0f)) : (cmpReference_); in execCompare() 615 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); 616 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); 617 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); 618 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f); 741 const float minA0 = de::clamp((uBounds0.x()-0.5f)-float(i0), 0.0f, 1.0f); 742 const float maxA0 = de::clamp((uBounds0.y()-0.5f)-float(i0), 0.0f, 1.0f); 743 const float minB0 = de::clamp((vBounds0.x()-0.5f)-float(j0), 0.0f, 1.0f); 744 const float maxB0 = de::clamp((vBounds [all...] |
H A D | tcuTexLookupVerifier.cpp | 699 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 700 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 762 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 763 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 764 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 765 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 838 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 839 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f); in isLinearSampleResultValid() 840 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f); in isLinearSampleResultValid() 841 const float maxB = de::clamp((vBound in isLinearSampleResultValid() [all...] |
H A D | tcuFuzzyImageCompare.cpp | 65 return (deUint8)de::clamp((int)(v + 0.5f), 0, 255); in roundToUint8Sat() 134 int i0 = de::clamp(x0, 0, w-1); in bilinearSample() 135 int i1 = de::clamp(x1, 0, w-1); in bilinearSample() 136 int j0 = de::clamp(y0, 0, h-1); in bilinearSample() 137 int j1 = de::clamp(y1, 0, h-1); in bilinearSample() 183 deUint32 p = readUnorm8<SrcChannels>(src, de::clamp(i+kx-shiftX, 0, src.getWidth()-1), j); in separableConvolve() 202 deUint32 p = readUnorm8<DstChannels>(tmpAccess, de::clamp(j+ky-shiftY, 0, tmp.getWidth()-1), i); in separableConvolve()
|
/third_party/python/Modules/_decimal/libmpdec/ |
H A D | context.c | 96 ctx->clamp=0; in mpd_maxcontext() 110 ctx->clamp=0; in mpd_defaultcontext() 124 ctx->clamp=0; in mpd_basiccontext() 142 ctx->clamp=1; in mpd_ieee_context() 187 return ctx->clamp; in mpd_getclamp() 263 ctx->clamp = c; in mpd_qsetclamp()
|
/third_party/mesa3d/src/gallium/auxiliary/draw/ |
H A D | draw_pipe_offset.c | 47 float clamp; member 115 if (offset->clamp) in do_offset_tri() 116 zoffset = (offset->clamp < 0.0f) ? MAX2(zoffset, offset->clamp) : in do_offset_tri() 117 MIN2(zoffset, offset->clamp); in do_offset_tri() 180 offset->clamp = rast->offset_clamp; in offset_first_tri() 195 offset->clamp = 0.0f; in offset_first_tri()
|
/third_party/skia/src/gpu/effects/ |
H A D | GrBicubicEffect.cpp | 88 // Bicubic can send colors out of range, so clamp to get them back in (source) gamut. in emitCode() 89 // The kind of clamp we have to do depends on the alpha type. in emitCode() 120 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make() local 122 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in Make() 136 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in Make() local 138 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in Make() 155 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in MakeSubset() local 157 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in MakeSubset() 183 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; in MakeSubset() local 185 new GrBicubicEffect(std::move(fp), kernel, direction, clamp))); in MakeSubset() 193 auto clamp = kPremul_SkAlphaType == alphaType ? Clamp::kPremul : Clamp::kUnpremul; Make() local 198 GrBicubicEffect(std::unique_ptr<GrFragmentProcessor> fp, SkImage::CubicResampler kernel, Direction direction, Clamp clamp) GrBicubicEffect() argument [all...] |
/third_party/mesa3d/src/mesa/main/ |
H A D | blend.c | 1042 _mesa_ClampColor(GLenum target, GLenum clamp) in _mesa_ClampColor() argument 1054 if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) { in _mesa_ClampColor() 1055 _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)"); in _mesa_ClampColor() 1064 ctx->Light.ClampVertexColor = clamp; in _mesa_ClampColor() 1070 if (ctx->Color.ClampFragmentColor != clamp) { in _mesa_ClampColor() 1072 ctx->Color.ClampFragmentColor = clamp; in _mesa_ClampColor() 1077 ctx->Color.ClampReadColor = clamp; in _mesa_ClampColor() 1091 get_clamp_color(const struct gl_framebuffer *fb, GLenum clamp) in get_clamp_color() argument 1131 GLboolean clamp; _mesa_update_clamp_fragment_color() local [all...] |
H A D | polygon.c | 309 GLfloat factor, GLfloat units, GLfloat clamp) in _mesa_polygon_offset_clamp() 313 ctx->Polygon.OffsetClamp == clamp) in _mesa_polygon_offset_clamp() 321 ctx->Polygon.OffsetClamp = clamp; in _mesa_polygon_offset_clamp() 336 _mesa_PolygonOffsetClampEXT( GLfloat factor, GLfloat units, GLfloat clamp ) in _mesa_PolygonOffsetClampEXT() 347 _mesa_debug(ctx, "glPolygonOffsetClamp %f %f %f\n", factor, units, clamp); in _mesa_PolygonOffsetClampEXT() 349 _mesa_polygon_offset_clamp(ctx, factor, units, clamp); in _mesa_PolygonOffsetClampEXT() 308 _mesa_polygon_offset_clamp(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp) _mesa_polygon_offset_clamp() argument
|
/third_party/mesa3d/src/gallium/frontends/nine/ |
H A D | nine_limits.h | 46 } clamp; member 60 [D3DRS_##o] = {NINE_STATE_CLAMP, {.clamp = {m, M}}} 191 if (Value < behaviour.u.clamp.min) in nine_fix_render_state_value() 192 Value = behaviour.u.clamp.min; in nine_fix_render_state_value() 193 else if (Value > behaviour.u.clamp.max) in nine_fix_render_state_value() 194 Value = behaviour.u.clamp.max; in nine_fix_render_state_value()
|
/third_party/vk-gl-cts/external/vulkancts/modules/vulkan/shaderexecutor/ |
H A D | vktShaderPackingFunctionTests.cpp | 189 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 190 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 297 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 298 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 408 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 409 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
/third_party/vk-gl-cts/modules/gles31/functional/ |
H A D | es31fShaderPackingFunctionTests.cpp | 185 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 186 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 275 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 276 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 376 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 377 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
/third_party/vk-gl-cts/external/vulkancts/modules_no_buildgn/vulkan/shaderexecutor/ |
H A D | vktShaderPackingFunctionTests.cpp | 189 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 190 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1); in iterate() 297 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f); in iterate() 298 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f); in iterate() 408 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1); in iterate() 409 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input in iterate() [all...] |
/third_party/skia/third_party/externals/swiftshader/src/Renderer/ |
H A D | Color.hpp | 95 r = clamp(c.r >> 4, 0, 255); in Color() 96 g = clamp(c.g >> 4, 0, 255); in Color() 97 b = clamp(c.b >> 4, 0, 255); in Color() 98 a = clamp(c.a >> 4, 0, 255); in Color() 104 r = ifloor(clamp(c.r * 256.0f, 0.0f, 255.0f)); in Color() 105 g = ifloor(clamp(c.g * 256.0f, 0.0f, 255.0f)); in Color() 106 b = ifloor(clamp(c.b * 256.0f, 0.0f, 255.0f)); in Color() 107 a = ifloor(clamp(c.a * 256.0f, 0.0f, 255.0f)); in Color() 140 r = iround(clamp(c.r * 4095.0f, -4096.0f, 4095.0f)); in Color() 141 g = iround(clamp( in Color() [all...] |
/third_party/skia/third_party/externals/swiftshader/src/Device/ |
H A D | ASTC_Decoder.cpp | 70 pix[0] = static_cast<unsigned char>(sw::clamp(fptr[0], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 71 pix[1] = static_cast<unsigned char>(sw::clamp(fptr[1], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 72 pix[2] = static_cast<unsigned char>(sw::clamp(fptr[2], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock() 73 pix[3] = static_cast<unsigned char>(sw::clamp(fptr[3], 0.0f, 1.0f) * 255.0f + 0.5f); in write_imageblock()
|
H A D | PixelProcessor.cpp | 62 factor.blendConstantU[i] = clamp(blendConstant[i], 0.0f, 1.0f); in setBlendConstant() 63 factor.invBlendConstantU[i] = 1.0f - clamp(blendConstant[i], 0.0f, 1.0f); in setBlendConstant() 64 factor.blendConstantS[i] = clamp(blendConstant[i], -1.0f, 1.0f); in setBlendConstant() 65 factor.invBlendConstantS[i] = 1.0f - clamp(blendConstant[i], -1.0f, 1.0f); in setBlendConstant() 71 routineCache = std::make_unique<RoutineCacheType>(clamp(cacheSize, 1, 65536)); in setRoutineCacheSize()
|
/third_party/astc-encoder/Source/ |
H A D | astcenc_compute_variance.cpp | 164 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 170 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 175 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance() 208 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 214 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 219 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance() 247 z_src = astc::clamp(z_src, 0, static_cast<int>(img->dim_z - 1)); in compute_pixel_region_variance() 253 y_src = astc::clamp(y_src, 0, static_cast<int>(img->dim_y - 1)); in compute_pixel_region_variance() 258 x_src = astc::clamp(x_src, 0, static_cast<int>(img->dim_x - 1)); in compute_pixel_region_variance()
|
H A D | astcenc_color_quantize.cpp | 754 scale_idx = astc::clamp(scale_idx, 0, 255); in quantize_rgbs() 934 color = clamp(0.0f, 65535.0f, color); in quantize_hdr_rgbo() 1036 g_fval = astc::clamp(g_fval, 0.0f, 65535.0f); in quantize_hdr_rgbo() 1037 b_fval = astc::clamp(b_fval, 0.0f, 65535.0f); in quantize_hdr_rgbo() 1144 s_fval = astc::clamp(s_fval, 0.0f, 1e9f); in quantize_hdr_rgbo() 1219 vals[i] = astc::clamp(vals[i], 0.0f, 65020.0f); in quantize_hdr_rgbo() 1227 vals[3] = astc::clamp(vals[3], 0.0f, 65020.0f); in quantize_hdr_rgbo() 1260 color0 = clamp(0.0f, 65535.0f, color0); 1261 color1 = clamp(0.0f, 65535.0f, color1); 1296 a_base = astc::clamp(a_bas [all...] |
H A D | astcenccli_error_metrics.cpp | 77 return astc::clamp(val, 0.0f, 255.0f); in mpsnr_operator() 180 color1 = clamp(0, 65504.0f, color1); in compute_error_metrics() 193 color1 = clamp(0, 65504.0f, color1); in compute_error_metrics() 219 color2 = clamp(0, 65504.0f, color2); in compute_error_metrics() 232 color2 = clamp(0, 65504.0f, color2); in compute_error_metrics() 280 // Float error can push this outside of valid range for acos, so clamp to avoid NaN issues in compute_error_metrics() 281 float normal_cos = clamp(-1.0f, 1.0f, dot3(normal1, normal2)).lane<0>(); in compute_error_metrics()
|
H A D | astcenc_color_unquantize.cpp | 62 output0 = clamp(0, 255, input0); in rgba_delta_unpack() 63 output1 = clamp(0, 255, input1); in rgba_delta_unpack() 278 lum1 = astc::clamp(lum1, 0, 255); in luminance_alpha_delta_unpack() 279 alpha1 = astc::clamp(alpha1, 0, 255); in luminance_alpha_delta_unpack() 416 // clamp to [0,0xFFF]. in hdr_rgbo_unpack() 564 // clamp the color components to [0,2^12 - 1] in hdr_rgb_unpack() 565 red0 = astc::clamp(red0, 0, 4095); in hdr_rgb_unpack() 566 green0 = astc::clamp(green0, 0, 4095); in hdr_rgb_unpack() 567 blue0 = astc::clamp(blue0, 0, 4095); in hdr_rgb_unpack() 569 red1 = astc::clamp(red in hdr_rgb_unpack() [all...] |
/third_party/mesa3d/src/compiler/nir/ |
H A D | nir_conversion_builder.h | 439 bool clamp) in nir_convert_with_rounding() 452 clamp = clamp && in nir_convert_with_rounding() 460 bool clamp_after_conversion = clamp && in nir_convert_with_rounding() 473 if (!clamp && round == nir_rounding_mode_undef) { in nir_convert_with_rounding() 475 } else if (!clamp && src_type == nir_type_float32 && in nir_convert_with_rounding() 490 /* clamp the result into range */ in nir_convert_with_rounding() 491 if (clamp && !clamp_after_conversion) in nir_convert_with_rounding() 435 nir_convert_with_rounding(nir_builder *b, nir_ssa_def *src, nir_alu_type src_type, nir_alu_type dest_type, nir_rounding_mode round, bool clamp) nir_convert_with_rounding() argument
|
/third_party/mesa3d/src/gallium/drivers/r300/ |
H A D | r300_state_inlines.h | 42 boolean clamp) in r300_translate_blend_function() 46 return clamp ? R300_COMB_FCN_ADD_CLAMP : R300_COMB_FCN_ADD_NOCLAMP; in r300_translate_blend_function() 48 return clamp ? R300_COMB_FCN_SUB_CLAMP : R300_COMB_FCN_SUB_NOCLAMP; in r300_translate_blend_function() 50 return clamp ? R300_COMB_FCN_RSUB_CLAMP : R300_COMB_FCN_RSUB_NOCLAMP; in r300_translate_blend_function() 41 r300_translate_blend_function(int blend_func, boolean clamp) r300_translate_blend_function() argument
|