broadcom/vc5: Add support for V3Dv4 signal bits.
The WRTMUC replaces the implicit uniform loads in the first two texture instructions. LDVPM disappears in favor of an ALU op. LDVARY, LDTMU, LDTLB, and LDUNIF*RF now write to arbitrary registers, which required passing the devinfo through to a few more functions.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "broadcom/common/v3d_device_info.h"
|
||||
#include "v3d_compiler.h"
|
||||
|
||||
int
|
||||
@@ -198,7 +199,7 @@ vir_depends_on_flags(struct qinst *inst)
|
||||
}
|
||||
|
||||
bool
|
||||
vir_writes_r3(struct qinst *inst)
|
||||
vir_writes_r3(const struct v3d_device_info *devinfo, struct qinst *inst)
|
||||
{
|
||||
for (int i = 0; i < vir_get_nsrc(inst); i++) {
|
||||
switch (inst->src[i].file) {
|
||||
@@ -210,11 +211,18 @@ vir_writes_r3(struct qinst *inst)
|
||||
}
|
||||
}
|
||||
|
||||
if (devinfo->ver < 41 && (inst->qpu.sig.ldvary ||
|
||||
inst->qpu.sig.ldtlb ||
|
||||
inst->qpu.sig.ldtlbu ||
|
||||
inst->qpu.sig.ldvpm)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
vir_writes_r4(struct qinst *inst)
|
||||
vir_writes_r4(const struct v3d_device_info *devinfo, struct qinst *inst)
|
||||
{
|
||||
switch (inst->dst.file) {
|
||||
case QFILE_MAGIC:
|
||||
@@ -231,7 +239,7 @@ vir_writes_r4(struct qinst *inst)
|
||||
break;
|
||||
}
|
||||
|
||||
if (inst->qpu.sig.ldtmu)
|
||||
if (devinfo->ver < 41 && inst->qpu.sig.ldtmu)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user