r600/sb: Fix constant-logical-operand warning.
authorVinson Lee <vlee@freedesktop.org>
Wed, 10 Oct 2018 20:38:12 +0000 (13:38 -0700)
committerVinson Lee <vlee@freedesktop.org>
Fri, 12 Oct 2018 17:58:58 +0000 (10:58 -0700)
sb/sb_bc_parser.cpp:620:27: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
        if (cf->bc.op_ptr->flags && FF_GDS)
                                 ^  ~~~~~~
sb/sb_bc_parser.cpp:620:27: note: use '&' for a bitwise operation
        if (cf->bc.op_ptr->flags && FF_GDS)
                                 ^~
                                 &
sb/sb_bc_parser.cpp:620:27: note: remove constant to silence this warning
        if (cf->bc.op_ptr->flags && FF_GDS)
                                ~^~~~~~~~~

Fixes: da977ad90747 ("r600/sb: start adding GDS support")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/sb/sb_bc_parser.cpp

index eafc1cb8ec471805656bc944a4cf45de3358e29b..90e6df745a75643d89d6ebf04ecd9c2ab580c781 100644 (file)
@@ -617,7 +617,7 @@ int bc_parser::decode_fetch_clause(cf_node* cf) {
        int r;
        unsigned i = cf->bc.addr << 1, cnt = cf->bc.count + 1;
 
-       if (cf->bc.op_ptr->flags && FF_GDS)
+       if (cf->bc.op_ptr->flags & FF_GDS)
                cf->subtype = NST_GDS_CLAUSE;
        else
                cf->subtype = NST_TEX_CLAUSE;