aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Rossi <[email protected]>2019-04-13 18:34:53 +0200
committerDave Airlie <[email protected]>2019-04-14 18:07:02 +1000
commit1af7701666bea2d6f4d0d226f5efc2fa65103872 (patch)
tree5c2d840e3bb502e5b2e8b16991942bdb48383e5e
parentb46b661f532978c0e41ba81e4c203978fa9ba4ac (diff)
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 <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
-rw-r--r--src/gallium/auxiliary/draw/draw_gs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_gs.c b/src/gallium/auxiliary/draw/draw_gs.c
index 1d6040993c6..6420cfbb261 100644
--- a/src/gallium/auxiliary/draw/draw_gs.c
+++ b/src/gallium/auxiliary/draw/draw_gs.c
@@ -737,7 +737,7 @@ draw_gs_init( struct draw_context *draw )
MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
draw->gs.tgsi.machine->PrimitiveOffsets[i] = align_malloc(
MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
- if (!draw->gs.tgsi.machine->Primitives[i] || !draw->gs.tgsi.machine->PrimitiveOffsets)
+ if (!draw->gs.tgsi.machine->Primitives[i] || !draw->gs.tgsi.machine->PrimitiveOffsets[i])
return FALSE;
memset(draw->gs.tgsi.machine->Primitives[i], 0,
MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector));