From: Iago Toral Quiroga Date: Wed, 5 Jun 2019 06:53:10 +0000 (+0200) Subject: v3d: fix scheduling dependency tracking for ALU with small immediates X-Git-Tag: android-x86-9.0-r1~5854 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=09d230c6cfdc2dfd1cf5eef28b158dadc636228f;p=android-x86%2Fexternal-mesa.git v3d: fix scheduling dependency tracking for ALU with small immediates We were not accountint for small immediates in the B mux so the scheduler was interpreting these are regular register file accesses, which could lead to additional (incorrect) write-read dependencies. Shader-db changes: total instructions in shared programs: 9163664 -> 9137263 (-0.29%) instructions in affected programs: 3931035 -> 3904634 (-0.67%) helped: 12457 HURT: 2563 total max-temps in shared programs: 1325787 -> 1325597 (-0.01%) max-temps in affected programs: 5746 -> 5556 (-3.31%) helped: 186 HURT: 16 helped stats (abs) min: 1 max: 4 x̄: 1.12 x̃: 1 helped stats (rel) min: 1.45% max: 22.22% x̄: 4.42% x̃: 3.28% HURT stats (abs) min: 1 max: 3 x̄: 1.12 x̃: 1 HURT stats (rel) min: 2.86% max: 10.00% x̄: 5.76% x̃: 5.88% 95% mean confidence interval for max-temps value: -1.04 -0.84 95% mean confidence interval for max-temps %-change: -4.16% -3.07% Max-temps are helped. Reviewed-by: Eric Anholt --- diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index d275940c136..290cfe38780 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -153,7 +153,10 @@ process_mux_deps(struct schedule_state *state, struct schedule_node *n, add_read_dep(state, state->last_rf[n->inst->qpu.raddr_a], n); break; case V3D_QPU_MUX_B: - add_read_dep(state, state->last_rf[n->inst->qpu.raddr_b], n); + if (!n->inst->qpu.sig.small_imm) { + add_read_dep(state, + state->last_rf[n->inst->qpu.raddr_b], n); + } break; default: add_read_dep(state, state->last_r[mux - V3D_QPU_MUX_R0], n);