freedreno/a3xx/compiler: const file relative addressing

Graphics / Mesa 3D Graphics Library / Mesa - Rob Clark [freedesktop.org] - 23 July 2014 08:03 UTC

Teach new compiler scheduling and register assignment how to deal with relative addressing. This gets us what we need to avoid falling back to old compiler for CONST[ADDR[0].x+n]. It is also a prerequisite for temp file relative addressing, although that is going to also need some cleverness in register assignment to keep arrays grouped together.

NOTE: doing address calculation in full precision and then narrowing to s16 in the mov to addr reg seems to sometimes cause lockups (and sometimes work?!). It seems more reliable to do the address calculation in s16, like the blob does. Which means teaching RA how to deal with mixed half and full precision allocation. Fortunately that didn't turn out to be too hard, so that is a nice bonus which we could probably take better advantage of elsewhere.

a5ac36a freedreno/a3xx/compiler: const file relative addressing
src/gallium/drivers/freedreno/a3xx/fd3_compiler.c | 86 ++++++++++-----------
src/gallium/drivers/freedreno/a3xx/instr-a3xx.h | 12 +++
src/gallium/drivers/freedreno/a3xx/ir3.h | 19 ++++-
src/gallium/drivers/freedreno/a3xx/ir3_cp.c | 5 +-
src/gallium/drivers/freedreno/a3xx/ir3_depth.c | 3 +
src/gallium/drivers/freedreno/a3xx/ir3_dump.c | 10 ++-
src/gallium/drivers/freedreno/a3xx/ir3_ra.c | 55 +++++++++----
src/gallium/drivers/freedreno/a3xx/ir3_sched.c | 81 +++++++++++++++++--
8 files changed, 203 insertions(+), 68 deletions(-)

Upstream: cgit.freedesktop.org


  • Share