summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-01-10 14:07:12 +1300
committerEric Anholt <[email protected]>2015-01-10 14:35:24 +1300
commita58ae83882b3ad3ecb53271f42cf1fd8f9c2907c (patch)
tree2a7cd5a8057ffb943091a1db1e950d16a2e64461 /src/gallium/drivers/vc4/vc4_program.c
parent06b6a72a3e4a36310cd664aa7e881881aeab146f (diff)
vc4: Redo VPM reads as a read file.
This will let us do copy propagation of the VPM reads.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index e362dcdf6ca..56cd5c27d7b 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1080,7 +1080,8 @@ emit_vertex_input(struct vc4_compile *c, int attr)
struct qreg vpm_reads[4];
for (int i = 0; i < align(attr_size, 4) / 4; i++) {
- vpm_reads[i] = qir_VPM_READ(c);
+ struct qreg vpm = { QFILE_VPM, attr * 4 + i };
+ vpm_reads[i] = qir_MOV(c, vpm);
c->num_inputs++;
}
@@ -1933,10 +1934,8 @@ emit_stub_vpm_read(struct vc4_compile *c)
return;
for (int i = 0; i < 4; i++) {
- qir_emit(c, qir_inst(QOP_VPM_READ,
- qir_get_temp(c),
- c->undef,
- c->undef));
+ struct qreg vpm = { QFILE_VPM, 0 };
+ (void)qir_MOV(c, vpm);
c->num_inputs++;
}
}