Lines Matching defs:result
68 /* Only the new-style SPIR-V subgroup instructions take a ballot result as
152 nir_ssa_def *result = NULL;
162 if (result) {
163 result = nir_iand(b, result, &chan_intrin->dest.ssa);
165 result = &chan_intrin->dest.ssa;
169 return result;
237 nir_ssa_def *result =
239 if (result)
240 return result;
333 * result = first_val;
336 * result = first_result;
349 * result in the first if, and invocations where id >
350 * gl_SubgroupInvocationID will be assigned their result in the second if.
360 nir_variable *result =
361 nir_local_variable_create(b->impl, glsl_type_for_ssa(val), "result");
370 nir_store_var(b, result, first_val, BITFIELD_MASK(val->num_components));
375 nir_store_var(b, result, first_result, BITFIELD_MASK(val->num_components));
382 return nir_load_var(b, result);
402 /* First compute the result assuming one ballot component. */
403 nir_ssa_def *result =
407 return result;
409 /* Fix up the result when there is > 1 component. The idea is that nir_ishl
417 * compute a single-component result of 2, which is correct for the second
435 nir_imm_intN_t(b, val >> 63, result->bit_size),
436 result),
437 nir_imm_intN_t(b, 0, result->bit_size));
478 /* First compute the result assuming one ballot component. */
479 nir_ssa_def *result =
488 * "result" in the first component and 0 in every other component.
495 * In case (2) it turns out that "result" will be ~0, because
498 * shifted by 0. This means that the first component can just be "result"
501 * result if we just follow (2) and then replace the first component with
502 * "result".
510 nir_pad_vector_imm_int(b, result, ~0ull, options->ballot_components);
520 nir_ssa_def *result = nir_channel(b, vec_result, 0);
522 result = nir_iadd(b, result, nir_channel(b, vec_result, i));
523 return result;
530 nir_ssa_def *result = nir_imm_int(b, -1);
533 /* result = channel >= 0 ? (i * bitsize + channel) : result */
534 result = nir_bcsel(b, nir_ige(b, channel, nir_imm_int(b, 0)),
536 result);
538 return result;
545 nir_ssa_def *result = nir_imm_int(b, -1);
548 /* result = channel >= 0 ? (i * bitsize + channel) : result */
549 result = nir_bcsel(b, nir_ige(b, channel, nir_imm_int(b, 0)),
551 result);
553 return result;
714 * 1, the result is undefined."