[Mesa-dev] [PATCH] gm107/ir: make sure that flagsDef is set when emitting setcond

Ilia Mirkin imirkin at alum.mit.edu
Tue Jun 28 02:47:26 UTC 2016


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Moderately sure this should work...

On Mon, Jun 27, 2016 at 6:59 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Rely on the existence of a second destination when emitting a setcond
> flag is dangerous, because this doesn't mean that the flag has been
> correctly set. Instead rely on flagsDef like what emitX() does
> for flagsSrc.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> index 40afbce..2c5e8f6 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp
> @@ -420,7 +420,7 @@ CodeEmitterGM107::emitSAT(int pos)
>  void
>  CodeEmitterGM107::emitCC(int pos)
>  {
> -   emitField(pos, 1, insn->defExists(1));
> +   emitField(pos, 1, insn->flagsDef >= 0);
>  }
>
>  void
> --
> 2.8.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list