aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-11-15 12:40:36 -0800
committerEric Anholt <[email protected]>2016-11-29 08:38:59 -0800
commit314f0c57e4c00b0a5cb544fa43e356c1069acd8f (patch)
tree618d894f3fe731eb3b51efadaa59f01f4b71eeb6 /src/gallium/drivers/vc4/vc4_opt_small_immediates.c
parent51087327f2ba929739719b2ae243d8c69d31346f (diff)
vc4: Refactor qir_get_op_nsrc(enum qop) to qir_get_nsrc(struct qinst *).
Every caller was dereffing the qinst, and this will let us make the number of sources vary depending on the destination of the qinst so that we can have general ALU ops that store to tex_[strb] and get an implicit uniform.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_opt_small_immediates.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_opt_small_immediates.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_small_immediates.c b/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
index 4c105f37344..15cbd12773f 100644
--- a/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
+++ b/src/gallium/drivers/vc4/vc4_opt_small_immediates.c
@@ -45,14 +45,14 @@ qir_opt_small_immediates(struct vc4_compile *c)
* elsewhere).
*/
bool uses_small_imm = false;
- for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
+ for (int i = 0; i < qir_get_nsrc(inst); i++) {
if (inst->src[i].file == QFILE_SMALL_IMM)
uses_small_imm = true;
}
if (uses_small_imm)
continue;
- for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
+ for (int i = 0; i < qir_get_nsrc(inst); i++) {
struct qreg src = qir_follow_movs(c, inst->src[i]);
if (src.file != QFILE_UNIF ||