v3d: Kill off vir_PF(), which is hard to use right.

You were allowed to pass in any old temp so that you could hopefully fold
the PF up into the def of the temp.  If we couldn't find one, it
implicitly generated a MOV(nop, reg).  However, that PF could have
different behavior depending on whether the def being folded into was a
float or int opcode, which the caller doesn't necessarily control.

Due to the fragility of the function, just switch all callers over to
vir_set_pf().  This also encourages the callers to use a _dest call for
the inst they're putting the PF on, eliminating a bunch of temps in the
pre-optimization VIR.

shader-db says the change is in the noise:

total instructions in shared programs: 6226247 -> 6227184 (0.02%)
instructions in affected programs: 851068 -> 852005 (0.11%)
This commit is contained in:
Eric Anholt
2019-02-13 12:09:02 -08:00
parent 6186a8d44e
commit 3022b4bd82
3 changed files with 36 additions and 70 deletions

View File

@@ -837,8 +837,6 @@ bool vir_init_reg_sets(struct v3d_compiler *compiler);
bool v3d_gl_format_is_return_32(GLenum format);
void vir_PF(struct v3d_compile *c, struct qreg src, enum v3d_qpu_pf pf);
static inline bool
quniform_contents_is_texture_p0(enum quniform_contents contents)
{