Sometimes when iterating over sources, we might want to check if it's the
implicit one. We wouldn't want to match on a non-implicit src using this
function.
int
vir_get_implicit_uniform_src(struct qinst *inst)
{
+ if (!vir_has_implicit_uniform(inst))
+ return -1;
return vir_get_nsrc(inst) - 1;
}
{
if (inst->src[i].file != QFILE_UNIF)
return false;
- if (vir_has_implicit_uniform(inst))
- return i != vir_get_implicit_uniform_src(inst);
- return true;
+ return i != vir_get_implicit_uniform_src(inst);
}
/* Returns the number of different uniform values referenced by the