mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
v3d: Return an invalid src number if asked for a missing implicit uniform.
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.
This commit is contained in:
parent
f2ea936f48
commit
79e0f042bc
2 changed files with 3 additions and 3 deletions
|
|
@ -74,6 +74,8 @@ vir_has_implicit_uniform(struct qinst *inst)
|
|||
int
|
||||
vir_get_implicit_uniform_src(struct qinst *inst)
|
||||
{
|
||||
if (!vir_has_implicit_uniform(inst))
|
||||
return -1;
|
||||
return vir_get_nsrc(inst) - 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,9 +76,7 @@ is_lowerable_uniform(struct qinst *inst, int i)
|
|||
{
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue