v3d: Implement a small immediates optimization, based on VC4's.

We can do one per instruction, and we have to be careful not to overwrite
raddr_b, but this greatly reduces the pressure on uniform loads
(particularly around ldvpm/stvpm instructions).

total instructions in shared programs: 90768 -> 88220 (-2.81%)
instructions in affected programs:     82711 -> 80163 (-3.08%)
This commit is contained in:
Eric Anholt
2018-07-20 14:27:09 -07:00
parent 79e0f042bc
commit 6b73a97f84
8 changed files with 143 additions and 19 deletions

View File

@@ -115,6 +115,7 @@ static inline struct qreg vir_reg(enum qfile file, uint32_t index)
*/
struct qpu_reg {
bool magic;
bool smimm;
int index;
};