diff options
author | Eric Anholt <[email protected]> | 2019-02-26 18:36:05 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-03-05 12:57:39 -0800 |
commit | 4739181a160cd941f7af78074c4f4ac7c6a1fd76 (patch) | |
tree | 7d48d8cc933f6446d01cebe94ed26262b8b0f749 /src/broadcom/compiler/vir_lower_uniforms.c | |
parent | 1e98f02d887dada530595bc0c74292d4678c5e1a (diff) |
v3d: Switch implicit uniforms over to being any qinst->uniform != ~0.
I'm not sure why I didn't do this before -- it's clearly much simpler to
add dumping of the extra thing than to have it as another implicit source.
Diffstat (limited to 'src/broadcom/compiler/vir_lower_uniforms.c')
-rw-r--r-- | src/broadcom/compiler/vir_lower_uniforms.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/broadcom/compiler/vir_lower_uniforms.c b/src/broadcom/compiler/vir_lower_uniforms.c index 570e601a66c..27d58fd33a1 100644 --- a/src/broadcom/compiler/vir_lower_uniforms.c +++ b/src/broadcom/compiler/vir_lower_uniforms.c @@ -76,7 +76,7 @@ is_lowerable_uniform(struct qinst *inst, int i) { if (inst->src[i].file != QFILE_UNIF) return false; - return i != vir_get_implicit_uniform_src(inst); + return true; } /* Returns the number of different uniform values referenced by the @@ -85,7 +85,7 @@ is_lowerable_uniform(struct qinst *inst, int i) static uint32_t vir_get_instruction_uniform_count(struct qinst *inst) { - uint32_t count = 0; + uint32_t count = vir_has_uniform(inst); for (int i = 0; i < vir_get_nsrc(inst); i++) { if (inst->src[i].file != QFILE_UNIF) @@ -123,8 +123,7 @@ vir_lower_uniforms(struct v3d_compile *c) continue; for (int i = 0; i < nsrc; i++) { - if (is_lowerable_uniform(inst, i)) - add_uniform(ht, inst->src[i]); + add_uniform(ht, inst->src[i]); } } |