[Mesa-dev] [PATCH v2] vc4: Correct typo setting 'handled_qinst_cond'

Rhys Kidd rhyskidd at gmail.com
Tue Feb 16 01:27:59 UTC 2016


On 15 February 2016 at 20:17, Eric Anholt <eric at anholt.net> wrote:

> Rhys Kidd <rhyskidd at gmail.com> writes:
>
> > Variable was previously always set to true. Accordingly, the later
> > assert() served no active purpose.
> >
> > Found with GCC warning and code inspection:
> >
> > mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c: In
> function'vc4_generate_code':
> > mesa/src/gallium/drivers/vc4/vc4_qpu_emit.c:315:22: warning: variable
> 'handled_qinst_cond' set but not used [-Wunused-but-set-variable]
> >                  bool handled_qinst_cond = true;
> >                       ^
> >
> > Separately, the early break for MOV no-ops in the default switch case
> > will trigger the assert() in debug builds.
> >
> >     ...
> >     /* Skip emitting the MOV if it's a no-op. */
> >     if (qir_is_raw_mov(qinst) &&
> >         dst.mux == src[0].mux && dst.addr == src[0].addr) {
> >             break;
> >     }
> >     ...
> >
> > This code path is tickled now that this typo is corrected.
>
> Thanks!  I've pushed your 3 patches, but with this last bit about the
> is_raw_mov() problem removed since I just put in a patch to fix the
> problem instead :)
>

Thanks Eric!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160215/26d3ad71/attachment.html>


More information about the mesa-dev mailing list