/external/mesa3d/src/mesa/main/ |
D | pack.c | 494 #define SRC_CONVERT(x) CLAMP((int)x, -32768, 32767) 510 #define SRC_CONVERT(x) CLAMP((int)x, -128, 127) 560 dst[i] = (CLAMP(rgba[i][RCOMP], 0, 7) << 5) in _mesa_pack_rgba_span_from_uints() 561 | (CLAMP(rgba[i][GCOMP], 0, 7) << 2) in _mesa_pack_rgba_span_from_uints() 562 | (CLAMP(rgba[i][BCOMP], 0, 3) ); in _mesa_pack_rgba_span_from_uints() 572 dst[i] = (CLAMP(rgba[i][RCOMP], 0, 7) ) in _mesa_pack_rgba_span_from_uints() 573 | (CLAMP(rgba[i][GCOMP], 0, 7) << 3) in _mesa_pack_rgba_span_from_uints() 574 | (CLAMP(rgba[i][BCOMP], 0, 3) << 6); in _mesa_pack_rgba_span_from_uints() 584 dst[i] = (CLAMP(rgba[i][RCOMP], 0, 31) << 11) in _mesa_pack_rgba_span_from_uints() 585 | (CLAMP(rgba[i][GCOMP], 0, 63) << 5) in _mesa_pack_rgba_span_from_uints() [all …]
|
D | pixeltransfer.c | 92 GLfloat r = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); in _mesa_map_rgba() 93 GLfloat g = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); in _mesa_map_rgba() 94 GLfloat b = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); in _mesa_map_rgba() 95 GLfloat a = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); in _mesa_map_rgba() 137 depthValues[i] = CLAMP(d, 0.0F, 1.0F); in _mesa_scale_and_bias_depth() 152 d = CLAMP(d, 0.0, max); in _mesa_scale_and_bias_depth_uint() 182 rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); in _mesa_apply_rgba_transfer_ops() 183 rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); in _mesa_apply_rgba_transfer_ops() 184 rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); in _mesa_apply_rgba_transfer_ops() 185 rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); in _mesa_apply_rgba_transfer_ops()
|
D | format_pack.c | 1390 du = FLOAT_TO_BYTE(CLAMP(src[0], 0.0F, 1.0F)); in pack_float_DUDV8() 1391 dv = FLOAT_TO_BYTE(CLAMP(src[1], 0.0F, 1.0F)); in pack_float_DUDV8() 1428 *d = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_R8() 1440 GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RG88_REV() 1441 GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RG88_REV() 1454 GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RGBX8888() 1455 GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RGBX8888() 1456 GLbyte b = FLOAT_TO_BYTE(CLAMP(src[BCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RGBX8888() 1470 GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RGBA8888() 1471 GLbyte g = FLOAT_TO_BYTE(CLAMP(src[GCOMP], -1.0f, 1.0f)); in pack_float_SIGNED_RGBA8888() [all …]
|
D | depth.c | 50 depth = CLAMP( depth, 0.0, 1.0 ); in _mesa_ClearDepth() 145 zmin = CLAMP(zmin, 0.0, 1.0); in _mesa_DepthBoundsEXT() 146 zmax = CLAMP(zmax, 0.0, 1.0); in _mesa_DepthBoundsEXT()
|
D | rastpos.c | 234 z2 = CLAMP(z, 0.0F, 1.0F) * (ctx->Viewport.Far - ctx->Viewport.Near) in window_pos3f() 252 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][0], 0.0F, 1.0F); in window_pos3f() 254 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][1], 0.0F, 1.0F); in window_pos3f() 256 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][2], 0.0F, 1.0F); in window_pos3f() 258 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR0][3], 0.0F, 1.0F); in window_pos3f() 260 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][0], 0.0F, 1.0F); in window_pos3f() 262 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][1], 0.0F, 1.0F); in window_pos3f() 264 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][2], 0.0F, 1.0F); in window_pos3f() 266 = CLAMP(ctx->Current.Attrib[VERT_ATTRIB_COLOR1][3], 0.0F, 1.0F); in window_pos3f()
|
D | fog.c | 159 ctx->Fog.Color[0] = CLAMP(params[0], 0.0F, 1.0F); in _mesa_Fogfv() 160 ctx->Fog.Color[1] = CLAMP(params[1], 0.0F, 1.0F); in _mesa_Fogfv() 161 ctx->Fog.Color[2] = CLAMP(params[2], 0.0F, 1.0F); in _mesa_Fogfv() 162 ctx->Fog.Color[3] = CLAMP(params[3], 0.0F, 1.0F); in _mesa_Fogfv()
|
D | texparam.c | 566 texObj->Priority = CLAMP(params[0], 0.0F, 1.0F); in set_tex_parameterf() 617 texObj->Sampler.BorderColor.f[RCOMP] = CLAMP(params[0], 0.0F, 1.0F); in set_tex_parameterf() 618 texObj->Sampler.BorderColor.f[GCOMP] = CLAMP(params[1], 0.0F, 1.0F); in set_tex_parameterf() 619 texObj->Sampler.BorderColor.f[BCOMP] = CLAMP(params[2], 0.0F, 1.0F); in set_tex_parameterf() 620 texObj->Sampler.BorderColor.f[ACOMP] = CLAMP(params[3], 0.0F, 1.0F); in set_tex_parameterf() 1319 params[0] = CLAMP(obj->Sampler.BorderColor.f[0], 0.0F, 1.0F); in _mesa_GetTexParameterfv() 1320 params[1] = CLAMP(obj->Sampler.BorderColor.f[1], 0.0F, 1.0F); in _mesa_GetTexParameterfv() 1321 params[2] = CLAMP(obj->Sampler.BorderColor.f[2], 0.0F, 1.0F); in _mesa_GetTexParameterfv() 1322 params[3] = CLAMP(obj->Sampler.BorderColor.f[3], 0.0F, 1.0F); in _mesa_GetTexParameterfv() 1505 b[0] = CLAMP(obj->Sampler.BorderColor.f[0], 0.0F, 1.0F); in _mesa_GetTexParameteriv() [all …]
|
D | viewport.c | 128 ctx->Viewport.Near = (GLfloat) CLAMP(nearval, 0.0, 1.0); in _mesa_DepthRange() 129 ctx->Viewport.Far = (GLfloat) CLAMP(farval, 0.0, 1.0); in _mesa_DepthRange()
|
/external/mesa3d/src/gallium/auxiliary/translate/ |
D | translate_generic.c | 265 value |= ((uint32_t)(CLAMP(src[2], 0, 1) * 0x3ff)) & 0x3ff; in emit_B10G10R10A2_UNORM() 266 value |= (((uint32_t)(CLAMP(src[1], 0, 1) * 0x3ff)) & 0x3ff) << 10; in emit_B10G10R10A2_UNORM() 267 value |= (((uint32_t)(CLAMP(src[0], 0, 1) * 0x3ff)) & 0x3ff) << 20; in emit_B10G10R10A2_UNORM() 268 value |= ((uint32_t)(CLAMP(src[3], 0, 1) * 0x3)) << 30; in emit_B10G10R10A2_UNORM() 280 value |= ((uint32_t)CLAMP(src[2], 0, 1023)) & 0x3ff; in emit_B10G10R10A2_USCALED() 281 value |= (((uint32_t)CLAMP(src[1], 0, 1023)) & 0x3ff) << 10; in emit_B10G10R10A2_USCALED() 282 value |= (((uint32_t)CLAMP(src[0], 0, 1023)) & 0x3ff) << 20; in emit_B10G10R10A2_USCALED() 283 value |= ((uint32_t)CLAMP(src[3], 0, 3)) << 30; in emit_B10G10R10A2_USCALED() 295 value |= (uint32_t)(((uint32_t)(CLAMP(src[2], -1, 1) * 0x1ff)) & 0x3ff) ; in emit_B10G10R10A2_SNORM() 296 value |= (uint32_t)((((uint32_t)(CLAMP(src[1], -1, 1) * 0x1ff)) & 0x3ff) << 10) ; in emit_B10G10R10A2_SNORM() [all …]
|
/external/mesa3d/src/mesa/tnl/ |
D | t_rasterpos.c | 127 diffuseColor[3] = CLAMP( in shade_rastpos() 238 Rcolor[0] = CLAMP(diffuseColor[0], 0.0F, 1.0F); in shade_rastpos() 239 Rcolor[1] = CLAMP(diffuseColor[1], 0.0F, 1.0F); in shade_rastpos() 240 Rcolor[2] = CLAMP(diffuseColor[2], 0.0F, 1.0F); in shade_rastpos() 241 Rcolor[3] = CLAMP(diffuseColor[3], 0.0F, 1.0F); in shade_rastpos() 242 Rspec[0] = CLAMP(specularColor[0], 0.0F, 1.0F); in shade_rastpos() 243 Rspec[1] = CLAMP(specularColor[1], 0.0F, 1.0F); in shade_rastpos() 244 Rspec[2] = CLAMP(specularColor[2], 0.0F, 1.0F); in shade_rastpos() 245 Rspec[3] = CLAMP(specularColor[3], 0.0F, 1.0F); in shade_rastpos() 422 ctx->Current.RasterPos[3] = CLAMP(ctx->Current.RasterPos[3], in _tnl_RasterPos()
|
/external/mesa3d/src/gallium/auxiliary/util/ |
D | u_format_yuv.h | 61 const float _r = CLAMP(r, 0.0f, 1.0f); in util_format_rgb_float_to_yuv() 62 const float _g = CLAMP(g, 0.0f, 1.0f); in util_format_rgb_float_to_yuv() 63 const float _b = CLAMP(b, 0.0f, 1.0f); in util_format_rgb_float_to_yuv() 117 *r = CLAMP(_r, 0, 255); in util_format_yuv_to_rgb_8unorm() 118 *g = CLAMP(_g, 0, 255); in util_format_yuv_to_rgb_8unorm() 119 *b = CLAMP(_b, 0, 255); in util_format_yuv_to_rgb_8unorm()
|
/external/mesa3d/src/mesa/swrast/ |
D | s_fog.c | 49 return CLAMP(f, 0.0F, 1.0F); in _swrast_z_to_fogfactor() 53 f = CLAMP(f, 0.0F, 1.0F); in _swrast_z_to_fogfactor() 58 f = CLAMP(f, 0.0F, 1.0F); in _swrast_z_to_fogfactor() 97 f = CLAMP(f, 0.0F, 1.0F); \ 114 f = CLAMP(f, 0.0F, 1.0F); \
|
D | s_chan.h | 96 #define CHAN_TO_USHORT(c) ((GLushort) (CLAMP((c), 0.0f, 1.0f) * 65535.0)) 97 #define CHAN_TO_SHORT(c) ((GLshort) (CLAMP((c), 0.0f, 1.0f) * 32767.0))
|
/external/mesa3d/src/gallium/auxiliary/draw/ |
D | draw_vs_exec.c | 166 output[slot][0] = CLAMP(machine->Outputs[slot].xyzw[0].f[j], 0.0f, 1.0f); in vs_exec_run_linear() 167 output[slot][1] = CLAMP(machine->Outputs[slot].xyzw[1].f[j], 0.0f, 1.0f); in vs_exec_run_linear() 168 output[slot][2] = CLAMP(machine->Outputs[slot].xyzw[2].f[j], 0.0f, 1.0f); in vs_exec_run_linear() 169 output[slot][3] = CLAMP(machine->Outputs[slot].xyzw[3].f[j], 0.0f, 1.0f); in vs_exec_run_linear()
|
D | draw_pipe_offset.c | 102 v0[2] = CLAMP(v0[2] + zoffset, 0.0f, 1.0f); in do_offset_tri() 103 v1[2] = CLAMP(v1[2] + zoffset, 0.0f, 1.0f); in do_offset_tri() 104 v2[2] = CLAMP(v2[2] + zoffset, 0.0f, 1.0f); in do_offset_tri()
|
/external/mesa3d/src/gallium/drivers/softpipe/ |
D | sp_tex_sample.c | 279 float u = CLAMP(s, 0.0F, 1.0F); in wrap_linear_clamp() 291 float u = CLAMP(s, 0.0F, 1.0F); in wrap_linear_clamp_to_edge() 309 float u = CLAMP(s, min, max); in wrap_linear_clamp_to_border() 399 *icoord = CLAMP(i, 0, (int) size-1); in wrap_nearest_unorm_clamp() 409 *icoord = util_ifloor( CLAMP(s, -0.5F, (float) size + 0.5F) ); in wrap_nearest_unorm_clamp_to_border() 419 *icoord = util_ifloor( CLAMP(s, 0.5F, (float) size - 0.5F) ); in wrap_nearest_unorm_clamp_to_edge() 431 float u = CLAMP(s - 0.5F, 0.0f, (float) size - 1.0f); in wrap_linear_unorm_clamp() 445 float u = CLAMP(s, -0.5F, (float) size + 0.5F); in wrap_linear_unorm_clamp_to_border() 462 float u = CLAMP(s, +0.5F, (float) size - 0.5F); in wrap_linear_unorm_clamp_to_edge() 479 *layer = CLAMP(c, 0, size - 1); in wrap_array_layer() [all …]
|
/external/mesa3d/src/mesa/drivers/dri/nouveau/ |
D | nv04_state_tex.c | 81 lod_max = CLAMP(MIN2(sa->MaxLod, t->_MaxLambda), in nv04_emit_tex_obj() 84 lod_bias = CLAMP(ctx->Texture.Unit[i].LodBias + in nv04_emit_tex_obj()
|
D | nv10_state_tex.c | 213 lod_max = CLAMP(lod_max, 0, 15); in nv10_emit_tex_obj() 214 lod_min = CLAMP(lod_min, 0, 15); in nv10_emit_tex_obj() 215 lod_bias = CLAMP(lod_bias, 0, 15); in nv10_emit_tex_obj()
|
D | nv20_state_tex.c | 225 lod_max = CLAMP(lod_max, 0, 15); in nv20_emit_tex_obj() 226 lod_min = CLAMP(lod_min, 0, 15); in nv20_emit_tex_obj() 227 lod_bias = CLAMP(lod_bias, 0, 15); in nv20_emit_tex_obj()
|
/external/mesa3d/src/mesa/drivers/dri/i965/ |
D | gen7_sampler_state.c | 146 sampler->ss0.lod_bias = S_FIXED(CLAMP(texUnit->LodBias + in gen7_update_sampler_state() 161 sampler->ss1.max_lod = U_FIXED(CLAMP(gl_sampler->MaxLod, 0, 13), 8); in gen7_update_sampler_state() 162 sampler->ss1.min_lod = U_FIXED(CLAMP(gl_sampler->MinLod, 0, 13), 8); in gen7_update_sampler_state()
|
D | gen6_sf_state.c | 222 uint32_t line_width_u3_7 = U_FIXED(CLAMP(ctx->Line.Width, 0.0, 7.99), 7); in upload_sf_state() 243 point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); in upload_sf_state() 246 dw4 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3); in upload_sf_state()
|
D | gen7_sf_state.c | 251 uint32_t line_width_u3_7 = U_FIXED(CLAMP(ctx->Line.Width, 0.0, 7.99), 7); in upload_sf_state() 278 point_size = CLAMP(ctx->Point.Size, ctx->Point.MinSize, ctx->Point.MaxSize); in upload_sf_state() 281 dw3 |= U_FIXED(CLAMP(point_size, 0.125, 255.875), 3); in upload_sf_state()
|
D | brw_sf_state.c | 235 sf->sf6.line_width = CLAMP(ctx->Line.Width, 1.0, 5.0) * (1<<1); in upload_sf_unit() 274 sf->sf7.point_size = CLAMP(rint(CLAMP(ctx->Point.Size, in upload_sf_unit()
|
/external/mesa3d/src/mesa/state_tracker/ |
D | st_atom_rasterizer.c | 208 raster->point_size = CLAMP(ctx->Point.Size, in update_raster_state() 217 raster->line_width = CLAMP(ctx->Line.Width, in update_raster_state() 222 raster->line_width = CLAMP(ctx->Line.Width, in update_raster_state()
|
/external/mesa3d/src/mesa/program/ |
D | prog_execute.c | 496 clampedValue[0] = CLAMP(value[0], 0.0F, 1.0F); in store_vector4() 497 clampedValue[1] = CLAMP(value[1], 0.0F, 1.0F); in store_vector4() 498 clampedValue[2] = CLAMP(value[2], 0.0F, 1.0F); in store_vector4() 499 clampedValue[3] = CLAMP(value[3], 0.0F, 1.0F); in store_vector4() 1031 a[3] = CLAMP(a[3], -(128.0F - epsilon), (128.0F - epsilon)); in _mesa_execute_program() 1309 a[0] = CLAMP(a[0], 0.0F, 1.0F); in _mesa_execute_program() 1310 a[1] = CLAMP(a[1], 0.0F, 1.0F); in _mesa_execute_program() 1325 a[0] = CLAMP(a[0], -128.0F / 127.0F, 1.0F); in _mesa_execute_program() 1326 a[1] = CLAMP(a[1], -128.0F / 127.0F, 1.0F); in _mesa_execute_program() 1327 a[2] = CLAMP(a[2], -128.0F / 127.0F, 1.0F); in _mesa_execute_program() [all …]
|