Lines Matching refs:src
37 unsigned src, unsigned num_components,
41 if (!nir_src_is_const(instr->src[src].src))
45 nir_alu_type type = nir_op_infos[instr->op].input_types[src];
48 int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]);
54 uint64_t val = nir_src_comp_as_uint(instr->src[src].src, swizzle[i]);
69 unsigned src, unsigned num_components,
73 if (!nir_src_is_const(instr->src[src].src))
76 int64_t int_min = u_intN_min(instr->src[src].src.ssa->bit_size);
79 nir_alu_type type = nir_op_infos[instr->op].input_types[src];
82 int64_t val = nir_src_comp_as_int(instr->src[src].src, swizzle[i]);
98 unsigned src, unsigned num_components,
102 if (!nir_src_is_const(instr->src[src].src))
106 uint64_t val = nir_src_comp_as_uint(instr->src[src].src, swizzle[i]);
118 unsigned src, unsigned num_components, \
122 if (!nir_src_is_const(instr->src[src].src)) \
126 uint64_t val = nir_src_comp_as_uint(instr->src[src].src, swizzle[i]); \
143 unsigned src, unsigned num_components,
147 if (!nir_src_is_const(instr->src[src].src))
151 nir_alu_type type = nir_op_infos[instr->op].input_types[src];
154 double val = nir_src_comp_as_float(instr->src[src].src, swizzle[i]);
170 * This differs from \c is_zero_to_one because that function tests 0 <= src <=
171 * 1 while this function tests 0 < src < 1.
175 unsigned src, unsigned num_components,
179 if (!nir_src_is_const(instr->src[src].src))
183 nir_alu_type type = nir_op_infos[instr->op].input_types[src];
186 double val = nir_src_comp_as_float(instr->src[src].src, swizzle[i]);
201 unsigned src, unsigned num_components,
204 if (nir_src_as_const_value(instr->src[src].src) == NULL)
208 nir_alu_type type = nir_op_infos[instr->op].input_types[src];
211 if (nir_src_comp_as_float(instr->src[src].src, swizzle[i]) == 0.0)
217 if (nir_src_comp_as_uint(instr->src[src].src, swizzle[i]) == 0)
231 unsigned src, unsigned num_components,
235 if (!nir_src_is_const(instr->src[src].src))
240 nir_src_comp_as_uint(instr->src[src].src, swizzle[i]);
252 unsigned src, unsigned num_components,
256 if (!nir_src_is_const(instr->src[src].src))
261 nir_src_comp_as_uint(instr->src[src].src, swizzle[i]);
272 unsigned src, UNUSED unsigned num_components,
275 return !nir_src_is_const(instr->src[src].src);
279 is_not_fmul(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
283 nir_src_as_alu_instr(instr->src[src].src);
295 is_fmul(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
299 nir_src_as_alu_instr(instr->src[src].src);
311 is_fsign(const nir_alu_instr *instr, unsigned src,
315 nir_src_as_alu_instr(instr->src[src].src);
321 src_alu = nir_src_as_alu_instr(src_alu->src[0].src);
328 unsigned src, unsigned num_components,
331 return is_not_const(ht, instr, src, num_components, swizzle) &&
332 !is_fsign(instr, src, num_components, swizzle);
372 nir_foreach_use(src, &instr->dest.dest.ssa) {
373 const nir_instr *const user_instr = src->parent_instr;
391 nir_foreach_use(src, &instr->dest.dest.ssa) {
392 const nir_instr *const user_instr = src->parent_instr;
399 unsigned index = (nir_alu_src*)container_of(src, nir_alu_src, src) - user_alu->src;
421 * Returns true if a NIR ALU src represents a constant integer
427 unsigned src, unsigned num_components,
430 if (nir_src_as_const_value(instr->src[src].src) == NULL)
434 unsigned half_bit_size = nir_src_bit_size(instr->src[src].src) / 2;
436 if ((nir_src_comp_as_uint(instr->src[src].src,
446 * Returns true if a NIR ALU src represents a constant integer
452 unsigned src, unsigned num_components,
455 if (nir_src_as_const_value(instr->src[src].src) == NULL)
460 (1 << (nir_src_bit_size(instr->src[src].src) / 2)) - 1;
461 if ((nir_src_comp_as_int(instr->src[src].src, swizzle[i]) & low_bits) != 0)
481 is_integral(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
484 const struct ssa_result_range r = nir_analyze_range(ht, instr, src);
494 unsigned src, UNUSED unsigned num_components,
497 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
504 unsigned src, UNUSED unsigned num_components,
507 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
517 unsigned src, UNUSED unsigned num_components, \
520 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); \
526 unsigned src, UNUSED unsigned num_components, \
529 const struct ssa_result_range v = nir_analyze_range(ht, instr, src); \
540 is_not_negative(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
543 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
549 unsigned src, UNUSED unsigned num_components,
552 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
559 is_not_positive(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
562 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
568 unsigned src, UNUSED unsigned num_components,
571 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
577 is_not_zero(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
580 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
586 unsigned src, UNUSED unsigned num_components,
589 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);
595 is_a_number(struct hash_table *ht, const nir_alu_instr *instr, unsigned src,
598 const struct ssa_result_range v = nir_analyze_range(ht, instr, src);