diff options
author | Eric Anholt <[email protected]> | 2016-11-15 12:40:36 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-11-29 08:38:59 -0800 |
commit | 314f0c57e4c00b0a5cb544fa43e356c1069acd8f (patch) | |
tree | 618d894f3fe731eb3b51efadaa59f01f4b71eeb6 /src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c | |
parent | 51087327f2ba929739719b2ae243d8c69d31346f (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_qir_lower_uniforms.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c index 8ec6c797396..1884cfa5b78 100644 --- a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c +++ b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c @@ -89,7 +89,7 @@ qir_get_instruction_uniform_count(struct qinst *inst) { uint32_t count = 0; - 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_UNIF) continue; @@ -119,7 +119,7 @@ qir_lower_uniforms(struct vc4_compile *c) * ht. */ qir_for_each_inst_inorder(inst, c) { - uint32_t nsrc = qir_get_op_nsrc(inst->op); + uint32_t nsrc = qir_get_nsrc(inst); if (qir_get_instruction_uniform_count(inst) <= 1) continue; @@ -155,7 +155,7 @@ qir_lower_uniforms(struct vc4_compile *c) struct qinst *mov = NULL; qir_for_each_inst(inst, block) { - uint32_t nsrc = qir_get_op_nsrc(inst->op); + uint32_t nsrc = qir_get_nsrc(inst); uint32_t count = qir_get_instruction_uniform_count(inst); |