freedreno/ir3/deps: report progress
Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>
This commit is contained in:
parent
e4ecfde2dd
commit
721147a05d
|
@ -1204,7 +1204,7 @@ bool ir3_cp(struct ir3 *ir, struct ir3_shader_variant *so);
|
||||||
void ir3_group(struct ir3 *ir);
|
void ir3_group(struct ir3 *ir);
|
||||||
|
|
||||||
/* scheduling: */
|
/* scheduling: */
|
||||||
void ir3_sched_add_deps(struct ir3 *ir);
|
bool ir3_sched_add_deps(struct ir3 *ir);
|
||||||
int ir3_sched(struct ir3 *ir);
|
int ir3_sched(struct ir3 *ir);
|
||||||
|
|
||||||
struct ir3_context;
|
struct ir3_context;
|
||||||
|
|
|
@ -1202,20 +1202,19 @@ add_barrier_deps(struct ir3_block *block, struct ir3_instruction *instr)
|
||||||
* (2) reads that come before a write actually get scheduled before the
|
* (2) reads that come before a write actually get scheduled before the
|
||||||
* write
|
* write
|
||||||
*/
|
*/
|
||||||
static void
|
bool
|
||||||
calculate_deps(struct ir3_block *block)
|
|
||||||
{
|
|
||||||
foreach_instr (instr, &block->instr_list) {
|
|
||||||
if (instr->barrier_class) {
|
|
||||||
add_barrier_deps(block, instr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ir3_sched_add_deps(struct ir3 *ir)
|
ir3_sched_add_deps(struct ir3 *ir)
|
||||||
{
|
{
|
||||||
|
bool progress = false;
|
||||||
|
|
||||||
foreach_block (block, &ir->block_list) {
|
foreach_block (block, &ir->block_list) {
|
||||||
calculate_deps(block);
|
foreach_instr (instr, &block->instr_list) {
|
||||||
|
if (instr->barrier_class) {
|
||||||
|
add_barrier_deps(block, instr);
|
||||||
|
progress = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return progress;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue