Lines Matching refs:ctx
54 mir_rewrite_index_src(compiler_context *ctx, unsigned old, unsigned new)
56 mir_foreach_instr_global(ctx, ins) {
62 mir_rewrite_index_src_swizzle(compiler_context *ctx, unsigned old, unsigned new, unsigned *swizzle)
64 mir_foreach_instr_global(ctx, ins) {
70 mir_rewrite_index_dst(compiler_context *ctx, unsigned old, unsigned new)
72 mir_foreach_instr_global(ctx, ins) {
77 if (ctx->blend_input == old)
78 ctx->blend_input = new;
80 if (ctx->blend_src1 == old)
81 ctx->blend_src1 = new;
85 mir_rewrite_index(compiler_context *ctx, unsigned old, unsigned new)
87 mir_rewrite_index_src(ctx, old, new);
88 mir_rewrite_index_dst(ctx, old, new);
92 mir_use_count(compiler_context *ctx, unsigned value)
96 mir_foreach_instr_global(ctx, ins) {
101 if (ctx->blend_input == value)
104 if (ctx->blend_src1 == value)
114 mir_single_use(compiler_context *ctx, unsigned value)
120 return mir_use_count(ctx, value) <= 1;
340 mir_bundle_for_op(compiler_context *ctx, midgard_instruction ins)
342 midgard_instruction *u = mir_upload_ins(ctx, ins);
383 compiler_context *ctx,
396 midgard_bundle new = mir_bundle_for_op(ctx, ins);
407 compiler_context *ctx,
424 midgard_bundle new = mir_bundle_for_op(ctx, ins);
466 /* Before squashing, calculate ctx->temp_count just by observing the MIR */
469 mir_compute_temp_count(compiler_context *ctx)
471 if (ctx->temp_count)
476 mir_foreach_instr_global(ctx, ins) {
481 ctx->temp_count = max_dest;