/third_party/mesa3d/src/gallium/drivers/softpipe/ |
H A D | sp_tex_sample.c | 505 float derivs[3][2][TGSI_QUAD_SIZE]) in compute_gradient_1d() 507 memset(derivs, 0, 6 * TGSI_QUAD_SIZE * sizeof(float)); in compute_gradient_1d() 508 derivs[0][0][0] = s[QUAD_BOTTOM_RIGHT] - s[QUAD_BOTTOM_LEFT]; in compute_gradient_1d() 509 derivs[0][1][0] = s[QUAD_TOP_LEFT] - s[QUAD_BOTTOM_LEFT]; in compute_gradient_1d() 514 const float derivs[3][2][TGSI_QUAD_SIZE], in compute_lambda_1d_explicit_gradients() 518 const float dsdx = fabsf(derivs[0][0][quad]); in compute_lambda_1d_explicit_gradients() 519 const float dsdy = fabsf(derivs[0][1][quad]); in compute_lambda_1d_explicit_gradients() 535 float derivs[3][2][TGSI_QUAD_SIZE]; in compute_lambda_1d() local 536 compute_gradient_1d(s, t, p, derivs); in compute_lambda_1d() 537 return compute_lambda_1d_explicit_gradients(sview, derivs, in compute_lambda_1d() 502 compute_gradient_1d(const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], float derivs[3][2][TGSI_QUAD_SIZE]) compute_gradient_1d() argument 513 compute_lambda_1d_explicit_gradients(const struct sp_sampler_view *sview, const float derivs[3][2][TGSI_QUAD_SIZE], uint quad) compute_lambda_1d_explicit_gradients() argument 542 compute_gradient_2d(const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], float derivs[3][2][TGSI_QUAD_SIZE]) compute_gradient_2d() argument 555 compute_lambda_2d_explicit_gradients(const struct sp_sampler_view *sview, const float derivs[3][2][TGSI_QUAD_SIZE], uint quad) compute_lambda_2d_explicit_gradients() argument 577 float derivs[3][2][TGSI_QUAD_SIZE]; compute_lambda_2d() local 584 compute_gradient_3d(const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], float derivs[3][2][TGSI_QUAD_SIZE]) compute_gradient_3d() argument 599 compute_lambda_3d_explicit_gradients(const struct sp_sampler_view *sview, const float derivs[3][2][TGSI_QUAD_SIZE], uint quad) compute_lambda_3d_explicit_gradients() argument 625 float derivs[3][2][TGSI_QUAD_SIZE]; compute_lambda_3d() local 632 compute_lambda_cube_explicit_gradients(const struct sp_sampler_view *sview, const float derivs[3][2][TGSI_QUAD_SIZE], uint quad) compute_lambda_cube_explicit_gradients() argument 657 float derivs[3][2][TGSI_QUAD_SIZE]; compute_lambda_cube() local 1970 compute_lambda_lod_unclamped(const struct sp_sampler_view *sp_sview, const struct sp_sampler *sp_samp, const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], const float derivs[3][2][TGSI_QUAD_SIZE], const float lod_in[TGSI_QUAD_SIZE], enum tgsi_sampler_control control, float lod[TGSI_QUAD_SIZE]) compute_lambda_lod_unclamped() argument 2020 compute_lambda_lod(const struct sp_sampler_view *sp_sview, const struct sp_sampler *sp_samp, const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], float derivs[3][2][TGSI_QUAD_SIZE], const float lod_in[TGSI_QUAD_SIZE], enum tgsi_sampler_control control, float lod[TGSI_QUAD_SIZE]) compute_lambda_lod() argument 3700 sp_tgsi_get_samples(struct tgsi_sampler *tgsi_sampler, const unsigned sview_index, const unsigned sampler_index, const float s[TGSI_QUAD_SIZE], const float t[TGSI_QUAD_SIZE], const float p[TGSI_QUAD_SIZE], const float c0[TGSI_QUAD_SIZE], const float lod_in[TGSI_QUAD_SIZE], float derivs[3][2][TGSI_QUAD_SIZE], const int8_t offset[3], enum tgsi_sampler_control control, float rgba[TGSI_NUM_CHANNELS][TGSI_QUAD_SIZE]) sp_tgsi_get_samples() argument [all...] |
H A D | sp_tex_sample.h | 57 const float derivs[3][2][TGSI_QUAD_SIZE],
|
/third_party/mesa3d/src/gallium/auxiliary/gallivm/ |
H A D | lp_bld_nir_aos.c | 284 static const struct lp_derivatives derivs = { 0 }; in emit_tex() local 291 params->derivs ? params->derivs[0] : derivs, in emit_tex()
|
H A D | lp_bld_tgsi_aos.c | 312 struct lp_derivatives derivs = { {NULL}, {NULL} }; in emit_tex() local 325 derivs.ddx[0] = lp_build_emit_fetch( &bld->bld_base, inst, 1 , LP_CHAN_ALL); in emit_tex() 326 derivs.ddy[0] = lp_build_emit_fetch( &bld->bld_base, inst, 2 , LP_CHAN_ALL); in emit_tex() 335 coords, derivs, in emit_tex() 348 struct lp_derivatives derivs = { {NULL}, {NULL} }; in emit_sample() local 366 coords, derivs, in emit_sample()
|
H A D | lp_bld_sample_soa.c | 2528 const struct lp_derivatives *derivs, /* optional */ in lp_build_sample_common() 2561 lp_build_cube_lookup(bld, coords, derivs, &cube_rho, &cube_derivs, need_derivs); in lp_build_sample_common() 2562 derivs = &cube_derivs; in lp_build_sample_common() 2621 derivs, lod_bias, explicit_lod, in lp_build_sample_common() 3288 * \param derivs partial derivatives of (s,t,r,q) with respect to x and y 3303 const struct lp_derivatives *derivs, /* optional */ in lp_build_sample_soa_code() 3346 assert(derivs == NULL); in lp_build_sample_soa_code() 3351 assert(derivs == NULL); in lp_build_sample_soa_code() 3354 assert(derivs); in lp_build_sample_soa_code() 3358 assert(derivs in lp_build_sample_soa_code() 2523 lp_build_sample_common(struct lp_build_sample_context *bld, boolean is_lodq, unsigned texture_index, unsigned sampler_index, LLVMValueRef *coords, const struct lp_derivatives *derivs, LLVMValueRef lod_bias, LLVMValueRef explicit_lod, LLVMValueRef *lod_pos_or_zero, LLVMValueRef *lod, LLVMValueRef *lod_fpart, LLVMValueRef *ilevel0, LLVMValueRef *ilevel1) lp_build_sample_common() argument 3291 lp_build_sample_soa_code(struct gallivm_state *gallivm, const struct lp_static_texture_state *static_texture_state, const struct lp_static_sampler_state *static_sampler_state, struct lp_sampler_dynamic_state *dynamic_state, struct lp_type type, unsigned sample_key, unsigned texture_index, unsigned sampler_index, LLVMValueRef context_ptr, LLVMValueRef thread_data_ptr, const LLVMValueRef *coords, const LLVMValueRef *offsets, const struct lp_derivatives *derivs, LLVMValueRef lod, LLVMValueRef ms_index, LLVMValueRef aniso_filter_table, LLVMValueRef texel_out[4]) lp_build_sample_soa_code() argument 3977 struct lp_derivatives derivs; lp_build_sample_gen_func() local 4109 const struct lp_derivatives *derivs = params->derivs; lp_build_sample_soa_func() local [all...] |
H A D | lp_bld_sample.h | 119 const struct lp_derivatives *derivs; member 591 const struct lp_derivatives *derivs,
|
H A D | lp_bld_nir.c | 2286 struct lp_derivatives derivs; in visit_tex() local 2355 derivs.ddx[0] = deriv_val; in visit_tex() 2358 derivs.ddx[chan] = LLVMBuildExtractValue(builder, deriv_val, in visit_tex() 2361 derivs.ddx[chan] = cast_type(bld_base, derivs.ddx[chan], nir_type_float, 32); in visit_tex() 2370 derivs.ddy[0] = deriv_val; in visit_tex() 2373 derivs.ddy[chan] = LLVMBuildExtractValue(builder, deriv_val, in visit_tex() 2376 derivs.ddy[chan] = cast_type(bld_base, derivs.ddy[chan], nir_type_float, 32); in visit_tex() 2447 params.derivs in visit_tex() [all...] |
H A D | lp_bld_sample.c | 333 * \param derivs partial derivatives of (s, t, r, q) with respect to X and Y 344 const struct lp_derivatives *derivs) in lp_build_rho() 374 * rho calcs are always per quad except for explicit derivs (excluding in lp_build_rho() 406 else if (derivs) { in lp_build_rho() 420 ddx[i] = lp_build_mul(coord_bld, floatdim, derivs->ddx[i]); in lp_build_rho() 421 ddy[i] = lp_build_mul(coord_bld, floatdim, derivs->ddy[i]); in lp_build_rho() 427 tmpx = lp_build_abs(coord_bld, derivs->ddx[i]); in lp_build_rho() 428 tmpy = lp_build_abs(coord_bld, derivs->ddy[i]); in lp_build_rho() 818 * \param derivs partial derivatives of (s, t, r, q) with respect to X and Y 837 const struct lp_derivatives *derivs, in lp_build_lod_selector() 338 lp_build_rho(struct lp_build_sample_context *bld, unsigned texture_unit, LLVMValueRef s, LLVMValueRef t, LLVMValueRef r, LLVMValueRef cube_rho, const struct lp_derivatives *derivs) lp_build_rho() argument 829 lp_build_lod_selector(struct lp_build_sample_context *bld, boolean is_lodq, unsigned texture_unit, unsigned sampler_unit, LLVMValueRef s, LLVMValueRef t, LLVMValueRef r, LLVMValueRef cube_rho, const struct lp_derivatives *derivs, LLVMValueRef lod_bias, LLVMValueRef explicit_lod, enum pipe_tex_mipfilter mip_filter, LLVMValueRef max_aniso, LLVMValueRef *out_lod, LLVMValueRef *out_lod_ipart, LLVMValueRef *out_lod_fpart, LLVMValueRef *out_lod_positive) lp_build_lod_selector() argument [all...] |
H A D | lp_bld_tgsi_soa.c | 2078 struct lp_derivatives derivs; in emit_tex() local 2231 derivs.ddx[dim] = lp_build_emit_fetch(&bld->bld_base, inst, 1, dim); in emit_tex() 2232 derivs.ddy[dim] = lp_build_emit_fetch(&bld->bld_base, inst, 2, dim); in emit_tex() 2234 params.derivs = &derivs; in emit_tex() 2291 struct lp_derivatives derivs; in emit_sample() local 2400 derivs.ddx[dim] = lp_build_emit_fetch(&bld->bld_base, inst, 3, dim); in emit_sample() 2401 derivs.ddy[dim] = lp_build_emit_fetch(&bld->bld_base, inst, 4, dim); in emit_sample() 2403 params.derivs = &derivs; in emit_sample() [all...] |
H A D | lp_bld_tgsi.h | 227 const struct lp_derivatives derivs,
|
/third_party/mesa3d/src/gallium/auxiliary/tgsi/ |
H A D | tgsi_exec.c | 1908 float derivs[3][2][TGSI_QUAD_SIZE], in fetch_texel() 1919 /* FIXME: handle explicit derivs, offsets */ in fetch_texel() 1921 s->f, t->f, p->f, c0->f, c1->f, derivs, offset, control, rgba); in fetch_texel() 1976 float derivs[2][TGSI_QUAD_SIZE]) in fetch_assign_deriv_channel() 1980 derivs[0][0] = d.f[0]; in fetch_assign_deriv_channel() 1981 derivs[0][1] = d.f[1]; in fetch_assign_deriv_channel() 1982 derivs[0][2] = d.f[2]; in fetch_assign_deriv_channel() 1983 derivs[0][3] = d.f[3]; in fetch_assign_deriv_channel() 1985 derivs[1][0] = d.f[0]; in fetch_assign_deriv_channel() 1986 derivs[ in fetch_assign_deriv_channel() 1900 fetch_texel( struct tgsi_sampler *sampler, const unsigned sview_idx, const unsigned sampler_idx, const union tgsi_exec_channel *s, const union tgsi_exec_channel *t, const union tgsi_exec_channel *p, const union tgsi_exec_channel *c0, const union tgsi_exec_channel *c1, float derivs[3][2][TGSI_QUAD_SIZE], const int8_t offset[3], enum tgsi_sampler_control control, union tgsi_exec_channel *r, union tgsi_exec_channel *g, union tgsi_exec_channel *b, union tgsi_exec_channel *a ) fetch_texel() argument 1972 fetch_assign_deriv_channel(struct tgsi_exec_machine *mach, const struct tgsi_full_instruction *inst, unsigned regdsrcx, unsigned chan, float derivs[2][TGSI_QUAD_SIZE]) fetch_assign_deriv_channel() argument 2218 float derivs[3][2][TGSI_QUAD_SIZE]; exec_txd() local 2577 float derivs[3][2][TGSI_QUAD_SIZE]; exec_sample_d() local [all...] |
H A D | tgsi_exec.h | 178 * derivs - explicit derivatives. 190 float derivs[3][2][TGSI_QUAD_SIZE],
|
/third_party/mesa3d/src/gallium/drivers/llvmpipe/ |
H A D | lp_state_fs_linear_llvm.c | 95 const struct lp_derivatives derivs, in emit_fetch_texel_linear() 90 emit_fetch_texel_linear(const struct lp_build_sampler_aos *base, struct lp_build_context *bld, enum tgsi_texture_type target, unsigned unit, LLVMValueRef coords, const struct lp_derivatives derivs, enum lp_build_tex_modifier modifier) emit_fetch_texel_linear() argument
|
/third_party/mesa3d/src/amd/llvm/ |
H A D | ac_llvm_build.c | 892 LLVMValueRef derivs[4]; in ac_prepare_cube_coords() local 926 derivs[axis * 2 + i] = in ac_prepare_cube_coords() 931 memcpy(derivs_arg, derivs, sizeof(derivs)); in ac_prepare_cube_coords() 2117 assert((a->bias ? 1 : 0) + (a->lod ? 1 : 0) + (a->level_zero ? 1 : 0) + (a->derivs[0] ? 1 : 0) <= in ac_build_image_opcode() 2132 assert(!a->derivs[0] || in ac_build_image_opcode() 2133 ((!a->g16 || ac_get_elem_bits(ctx, LLVMTypeOf(a->derivs[0])) == 16) && in ac_build_image_opcode() 2134 (a->g16 || ac_get_elem_bits(ctx, LLVMTypeOf(a->derivs[0])) == 32))); in ac_build_image_opcode() 2203 if (a->derivs[0]) { in ac_build_image_opcode() 2206 args[num_args++] = ac_to_float(ctx, a->derivs[ in ac_build_image_opcode() [all...] |
H A D | ac_llvm_build.h | 408 LLVMValueRef derivs[6]; member
|
H A D | ac_nir_to_llvm.c | 4832 args.derivs[i] = ac_to_float(&ctx->ac, ac_llvm_extract_elem(&ctx->ac, ddx, i)); in visit_tex() 4833 args.derivs[num_dest_deriv_channels + i] = in visit_tex() 4838 args.derivs[i] = zero; in visit_tex() 4839 args.derivs[num_dest_deriv_channels + i] = zero; in visit_tex() 4849 instr->op == nir_texop_lod, args.coords, args.derivs); in visit_tex()
|
/third_party/mesa3d/src/amd/compiler/ |
H A D | aco_instruction_selection.cpp | 9421 std::vector<Temp> derivs; 9640 derivs.push_back(derv); 9848 args.insert(args.end(), derivs.begin(), derivs.end());
|