/* Alpha ref value passed in */
float alpha_ref;
+ unsigned quadword_count;
+
/* The mapping of sysvals to uniforms, the count, and the off-by-one inverse */
unsigned sysvals[MAX_SYSVAL_COUNT];
unsigned sysval_count;
disassemble_midgard(program->compiled.data, program->compiled.size);
if (midgard_debug & MIDGARD_DBG_SHADERDB) {
- unsigned nr_bundles = 0, nr_ins = 0, nr_quadwords = 0;
+ unsigned nr_bundles = 0, nr_ins = 0;
/* Count instructions and bundles */
nr_bundles += util_dynarray_num_elements(
&block->bundles, midgard_bundle);
- nr_quadwords += block->quadword_count;
-
mir_foreach_bundle_in_block(block, bun)
nr_ins += bun->instruction_count;
}
"%d:%d spills:fills\n",
SHADER_DB_COUNT++,
gl_shader_stage_name(ctx->stage),
- nr_ins, nr_bundles, nr_quadwords,
+ nr_ins, nr_bundles, ctx->quadword_count,
nr_registers, nr_threads,
ctx->loop_count,
ctx->spills, ctx->fills);
util_dynarray_append(&block->bundles, midgard_bundle, bundle);
if (bundle.has_blend_constant) {
- /* TODO: Multiblock? */
- int quadwords_within_block = block->quadword_count + quadword_size(bundle.tag) - 1;
- ctx->blend_constant_offset = quadwords_within_block * 0x10;
+ unsigned offset = ctx->quadword_count + block->quadword_count + quadword_size(bundle.tag) - 1;
+ ctx->blend_constant_offset = offset * 0x10;
}
while(skip--)
}
block->is_scheduled = true;
+ ctx->quadword_count += block->quadword_count;
}
/* The following passes reorder MIR instructions to enable better scheduling */