freedreno: Silence compiler warnings about "*" in boolean context.
authorEric Anholt <eric@anholt.net>
Fri, 10 May 2019 00:32:25 +0000 (17:32 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 13 May 2019 22:37:01 +0000 (15:37 -0700)
It sure looks like we just want both of them to be nonzero, and && is
probably going to be cheaper than * anyway.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
src/gallium/drivers/freedreno/a4xx/fd4_gmem.c

index 7de0a92cdc1e4f58a7c09e8694451009803e318b..5c3079e2dcb0894ae31aa6d8f7fc1f502ed6a960 100644 (file)
@@ -1016,7 +1016,7 @@ fd3_emit_tile_renderprep(struct fd_batch *batch, struct fd_tile *tile)
        if (use_hw_binning(batch)) {
                struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[tile->p];
 
-               assert(pipe->w * pipe->h);
+               assert(pipe->w && pipe->h);
 
                fd_event_write(batch, ring, HLSQ_FLUSH);
                fd_wfi(batch, ring);
index 7543658dc08c44e809de9f0bce7576d5d99dbde5..5d5e3870d83ec847ea6be17218018c579782dc14 100644 (file)
@@ -770,7 +770,7 @@ fd4_emit_tile_renderprep(struct fd_batch *batch, struct fd_tile *tile)
        if (use_hw_binning(batch)) {
                struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[tile->p];
 
-               assert(pipe->w * pipe->h);
+               assert(pipe->w && pipe->h);
 
                fd_event_write(batch, ring, HLSQ_FLUSH);
                fd_wfi(batch, ring);