draw: fix building error in draw_gs_init()
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 13 Apr 2019 16:34:53 +0000 (18:34 +0200)
committerDave Airlie <airlied@redhat.com>
Sun, 14 Apr 2019 08:07:02 +0000 (18:07 +1000)
commit1af7701666bea2d6f4d0d226f5efc2fa65103872
tree5c2d840e3bb502e5b2e8b16991942bdb48383e5e
parentb46b661f532978c0e41ba81e4c203978fa9ba4ac
draw: fix building error in draw_gs_init()

Fixes the following building error happening with Android build system:

external/mesa/src/gallium/auxiliary/draw/draw_gs.c:740:79:
error: address of array 'draw->gs.tgsi.machine->PrimitiveOffsets' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
         if (!draw->gs.tgsi.machine->Primitives[i] || !draw->gs.tgsi.machine->PrimitiveOffsets)
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
1 error generated.

Fixes: 7720ce3 ("draw: add support to tgsi paths for geometry streams. (v2)")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/gallium/auxiliary/draw/draw_gs.c