Lines Matching defs:block
81 struct ir3_block *block = ctx->block;
84 struct ir3_instruction *inloc = create_immed(block, n);
87 instr = ir3_BARY_F(block, inloc, 0, coord, 0);
90 instr = ir3_FLAT_B(block, inloc, 0, inloc, 0);
92 instr = ir3_LDLV(block, inloc, 0, create_immed(block, 1), 0);
97 instr = ir3_BARY_F(block, inloc, 0, ctx->ij[IJ_PERSP_PIXEL], 0);
112 return create_uniform(ctx->block, r);
265 struct ir3_instruction *cov = ir3_COV(ctx->block, src, src_type, dst_type);
289 return ir3_COV(ctx->block, src, TYPE_U32, TYPE_U16);
299 accumulator = create_immed(ctx->block, 0);
304 dst[0] = ir3_DP4ACC(ctx->block, src[0], 0, src[1], 0, accumulator, 0);
317 dst[0] = ir3_ADD_U(ctx->block, dst[0], 0, src[2], 0);
340 accumulator = create_immed(ctx->block, 0);
345 dst[0] = ir3_DP2ACC(ctx->block, src[0], 0, src[1], 0, accumulator, 0);
349 dst[0] = ir3_DP2ACC(ctx->block, src[0], 0, src[1], 0, dst[0], 0);
354 dst[0] = ir3_ADD_U(ctx->block, dst[0], 0, src[2], 0);
357 dst[0] = ir3_ADD_S(ctx->block, dst[0], 0, src[2], 0);
368 struct ir3_block *b = ctx->block;
398 src[i] = create_immed_typed(ctx->block, 0, dst_type);
675 create_immed_typed(ctx->block, 1, ctx->compiler->bool_type);
886 struct ir3_block *b = ctx->block;
914 struct ir3_block *b = ctx->block;
941 struct ir3_block *b = ctx->block;
1022 struct ir3_block *b = ctx->block;
1055 struct ir3_block *b = ctx->block;
1082 struct ir3_block *b = ctx->block;
1105 struct ir3_block *b = ctx->block;
1135 struct ir3_block *b = ctx->block;
1163 struct ir3_block *b = ctx->block;
1206 struct ir3_block *b = ctx->block;
1268 struct ir3_block *b = ctx->block;
1291 struct ir3_block *b = ctx->block;
1313 struct ir3_block *b = ctx->block;
1352 struct ir3_block *b = ctx->block;
1398 texture = create_immed_typed(ctx->block, tex_idx, TYPE_U16);
1399 sampler = create_immed_typed(ctx->block, tex_idx, TYPE_U16);
1416 sam = ir3_SAM(ctx->block, opc, type, wrmask, info.flags, info.samp_tex, src0,
1452 struct ir3_block *b = ctx->block;
1494 struct ir3_block *b = ctx->block;
1545 struct ir3_block *b = ctx->block;
1574 struct ir3_block *b = ctx->block;
1589 struct ir3_block *b = ctx->block;
1853 ir3_split_dest(ctx->block, dst, ij, 0, 2);
1896 create_multidst_mov(struct ir3_block *block, struct ir3_register *dst)
1898 struct ir3_instruction *mov = ir3_instr_create(block, OPC_MOV, 1, 1);
1984 create_immed(ctx->block, get_reduce_identity(nir_reduce_op, dst_size));
1985 identity = ir3_READ_FIRST_MACRO(ctx->block, identity, 0);
1997 ir3_instr_create(ctx->block, OPC_SCAN_MACRO, 3, 2);
2029 return create_multidst_mov(ctx->block, dst);
2041 struct ir3_block *b = ctx->block;
2520 dst[0] = ir3_ANY_MACRO(ctx->block, pred, 0);
2522 dst[0] = ir3_ALL_MACRO(ctx->block, pred, 0);
2528 dst[0] = ir3_ELECT_MACRO(ctx->block);
2535 dst[0] = ir3_SHPS_MACRO(ctx->block);
2542 dst[0] = ir3_READ_COND_MACRO(ctx->block, ir3_get_predicate(ctx, cond), 0,
2553 dst[0] = ir3_READ_FIRST_MACRO(ctx->block, src, 0);
2564 ballot = ir3_MOVMSK(ctx->block, components);
2568 ballot = ir3_BALLOT_MACRO(ctx->block, pred, components);
2577 ir3_split_dest(ctx->block, dst, ballot, 0, components);
2588 idx = ir3_COV(ctx->block, idx, TYPE_U32, dst_type);
2590 dst[0] = ir3_QUAD_SHUFFLE_BRCST(ctx->block, src, 0, idx, 0);
2597 dst[0] = ir3_QUAD_SHUFFLE_HORIZ(ctx->block, src, 0);
2604 dst[0] = ir3_QUAD_SHUFFLE_VERT(ctx->block, src, 0);
2611 dst[0] = ir3_QUAD_SHUFFLE_DIAG(ctx->block, src, 0);
2646 struct ir3_instruction *instr = ir3_SHPE(ctx->block);
2669 ir3_STC(ctx->block, create_immed(b, dst_lo), 0, src, 0);
2699 dst[i] = create_immed_typed(ctx->block, instr->value[i].u8, TYPE_U8);
2702 dst[i] = create_immed_typed(ctx->block, instr->value[i].u16, TYPE_U16);
2705 dst[i] = create_immed_typed(ctx->block, instr->value[i].u32, TYPE_U32);
2720 dst[i] = create_immed_typed(ctx->block, fui(0.0), type);
2786 struct ir3_block *b = ctx->block;
2886 texture = ir3_COV(ctx->block, texture, TYPE_U32, TYPE_U16);
2895 texture = create_immed_typed(ctx->block, tex->texture_index, TYPE_U16);
2901 sampler = ir3_COV(ctx->block, sampler, TYPE_U32, TYPE_U16);
2903 sampler = create_immed_typed(ctx->block, tex->sampler_index, TYPE_U16);
2916 struct ir3_block *b = ctx->block;
3164 b, create_immed_typed(ctx->block, ctx->so->num_samp, TYPE_U16),
3165 create_immed_typed(ctx->block, ctx->so->num_samp, TYPE_U16));
3299 struct ir3_block *b = ctx->block;
3325 struct ir3_block *b = ctx->block;
3392 phi = ir3_instr_create(ctx->block, OPC_META_PHI, 1,
3437 unreachable("couldn't find phi node ir3 block");
3442 resolve_phis(struct ir3_context *ctx, struct ir3_block *block)
3444 foreach_instr (phi, &block->instr_list) {
3453 for (unsigned i = 0; i < block->predecessors_count; i++) {
3454 struct ir3_block *pred = block->predecessors[i];
3474 * successor block link to figure out where we need to
3540 struct ir3_block *block;
3547 block = ir3_block_create(ctx->ir);
3548 block->nblock = nblock;
3549 _mesa_hash_table_insert(ctx->block_ht, nblock, block);
3551 return block;
3569 struct ir3_block *block = ir3_block_create(ctx->ir);
3570 block->nblock = NULL;
3571 _mesa_hash_table_insert(ctx->continue_block_ht, nblock, block);
3572 return block;
3578 ctx->block = get_block(ctx, nblock);
3580 list_addtail(&ctx->block->node, &ctx->ir->block_list);
3582 ctx->block->loop_id = ctx->loop_id;
3583 ctx->block->loop_depth = ctx->loop_depth;
3585 /* re-emit addr register in each block if needed: */
3602 for (int i = 0; i < ARRAY_SIZE(ctx->block->successors); i++) {
3604 ctx->block->successors[i] =
3606 ctx->block->physical_successors[i] = ctx->block->successors[i];
3620 if (condition->opc == OPC_ANY_MACRO && condition->block == ctx->block) {
3621 ctx->block->condition = ssa(condition->srcs[0]);
3622 ctx->block->brtype = IR3_BRANCH_ANY;
3624 condition->block == ctx->block) {
3625 ctx->block->condition = ssa(condition->srcs[0]);
3626 ctx->block->brtype = IR3_BRANCH_ALL;
3628 condition->block == ctx->block) {
3629 ctx->block->condition = NULL;
3630 ctx->block->brtype = IR3_BRANCH_GETONE;
3632 condition->block == ctx->block) {
3633 /* TODO: technically this only works if the block is the only user of the
3637 ctx->block->condition = NULL;
3638 ctx->block->brtype = IR3_BRANCH_SHPS;
3640 ctx->block->condition = ir3_get_predicate(ctx, condition);
3641 ctx->block->brtype = IR3_BRANCH_COND;
3674 * edges) then we need to create a continue block after the loop to ensure
3736 /* emit stream-out code. At this point, the current block is the original
3737 * (nir) end block, and nir ensures that all flow control paths terminate
3738 * into the end block. We re-purpose the original end block to generate
3740 * block holding stream-out write instructions, followed by the new end
3741 * block:
3765 /* create vtxcnt input in input block at top of shader,
3772 /* at this point, we are at the original 'end' block,
3773 * re-purpose this block to stream-out condition, then
3774 * append stream-out block and new-end block
3776 orig_end_block = ctx->block;
3798 cond = ir3_CMPS_S(ctx->block, vtxcnt, 0, maxvtxcnt, 0);
3803 /* condition goes on previous block to the conditional,
3812 ctx->block = stream_out_block;
3823 base = create_uniform(ctx->block, regid(const_state->offsets.tfbo, i));
3826 off = ir3_MUL_U24(ctx->block, vtxcnt, 0,
3827 create_immed(ctx->block, stride * 4), 0);
3829 bases[i] = ir3_ADD_S(ctx->block, off, 0, base, 0);
3842 ctx->block, base, 0,
3843 create_immed(ctx->block, (strmout->output[i].dst_offset + j) * 4),
3844 0, out, 0, create_immed(ctx->block, 1), 0);
3847 array_insert(ctx->block, ctx->block->keeps, stg);
3852 ctx->block = new_end_block;
3858 foreach_block (block, &ir->block_list) {
3859 for (int i = 0; i < ARRAY_SIZE(block->successors); i++) {
3860 if (block->successors[i])
3861 ir3_block_add_predecessor(block->successors[i], block);
3862 if (block->physical_successors[i])
3863 ir3_block_add_physical_predecessor(block->physical_successors[i],
3864 block);
3881 /* at this point, we should have a single empty block,
3884 compile_assert(ctx, list_is_empty(&ctx->block->instr_list));
3887 * stream-out instructions, followed by a new empty block (into
3893 * So by re-purposing end_block as the first block of stream-
3905 foreach_block (block, &ctx->ir->block_list) {
3906 resolve_phis(ctx, block);
3917 coord = ir3_create_collect(ctx->block, ir3_get_src(ctx, &intr->src[0]), 2);
3989 ir3_split_dest(ctx->block, &ctx->inputs[idx], input, i, 1);
4016 foreach_block (block, &ctx->ir->block_list) {
4017 foreach_instr (instr, &block->instr_list) {
4095 foreach_block (block, &ctx->ir->block_list) {
4096 foreach_instr (instr, &block->instr_list) {
4208 ctx->outputs[idx] = create_immed(ctx->block, fui(0.0));
4222 ctx->outputs[idx] = create_immed(ctx->block, fui(0.0));
4309 /* Create inputs in first block: */
4310 ctx->block = get_block(ctx, nir_start_block(fxn));
4311 ctx->in_block = ctx->block;
4407 struct ir3_instruction *barrier = ir3_BAR(ctx->block);
4410 array_insert(ctx->block, ctx->block->keeps, barrier);
4498 foreach_block_rev (block, &ir->block_list) {
4499 foreach_instr_rev (instr, &block->instr_list) {
4555 foreach_block (block, &ir->block_list) {
4556 foreach_instr_safe (instr, &block->instr_list) {
4654 struct ir3_instruction *out = ir3_collect(ctx->block, ctx->primitive_id);
4667 struct ir3_instruction *out = ir3_collect(ctx->block, ctx->rel_patch_id);
4677 struct ir3_instruction *out = ir3_collect(ctx->block, ctx->gs_header);
4687 struct ir3_instruction *out = ir3_collect(ctx->block, ctx->tcs_header);
4695 ir3_instr_create(ctx->block, OPC_CHMASK, 0, outputs_count);
4705 array_insert(ctx->block, ctx->block->keeps, chmask);
4707 struct ir3_instruction *chsh = ir3_CHSH(ctx->block);
4716 struct ir3_block *b = ctx->block;
4717 /* Insert these collect's in the block before the end-block if
4721 if (ctx->block->predecessors_count == 1)
4722 b = ctx->block->predecessors[0];
4781 array_insert(in->block, in->block->keeps, in);
4786 ir3_instr_create(ctx->block, OPC_END, 0, outputs_count);
4795 array_insert(ctx->block, ctx->block->keeps, end);
4967 foreach_block (block, &ir->block_list) {
4968 foreach_instr (instr, &block->instr_list) {