[Mesa-dev] [PATCH] i965: possible typo in ir_unop_f2b case.

Matt Turner mattst88 at gmail.com
Wed Sep 3 12:02:23 PDT 2014


On Mon, Sep 1, 2014 at 4:15 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Coverity reported this, I'm not sure this patch is correct, but I'm sure
> someone who knows can fix this or push my fix.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> index 2fa90a4..5d10eb1 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
> @@ -2300,7 +2300,7 @@ fs_visitor::emit_bool_to_cond_code(ir_rvalue *ir)
>
>     case ir_unop_f2b:
>        if (brw->gen >= 6) {
> -         emit(CMP(reg_null_d, op[0], fs_reg(0.0f), BRW_CONDITIONAL_NZ));
> +         emit(CMP(reg_null_f, op[0], fs_reg(0.0f), BRW_CONDITIONAL_NZ));
>        } else {
>           inst = emit(MOV(reg_null_f, op[0]));
>           inst->conditional_mod = BRW_CONDITIONAL_NZ;
> --

I don't think this should matter. I'm mostly curious about what
warning Coverity gave for this? It seems like it would have to a
pretty deep understanding of the code to warn about this
(alternatively, no understanding at all).


More information about the mesa-dev mailing list