anv: Silence compiler warnings about uninitialized bind_offset.
authorEric Anholt <eric@anholt.net>
Sat, 10 Feb 2018 11:11:14 +0000 (11:11 +0000)
committerEric Anholt <eric@anholt.net>
Fri, 16 Mar 2018 22:09:47 +0000 (15:09 -0700)
This is a legitimate warning: if anv's blorp_alloc_binding_table() throws
an error from anv_cmd_buffer_alloc_blorp_binding_table(), we silently
continue to use this undefined value.  The rest of this code doesn't seem
very allocation-error-proof, though, either.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/blorp/blorp_genX_exec.h

index b612709035aaf8a7c45dbb4ca313aeb0e49b95f1..992bc9959a1d4cc3bda68bc47e3a5d76b6d51407 100644 (file)
@@ -1388,7 +1388,7 @@ blorp_emit_surface_states(struct blorp_batch *batch,
                           const struct blorp_params *params)
 {
    const struct isl_device *isl_dev = batch->blorp->isl_dev;
-   uint32_t bind_offset, surface_offsets[2];
+   uint32_t bind_offset = 0, surface_offsets[2];
    void *surface_maps[2];
 
    MAYBE_UNUSED bool has_indirect_clear_color = false;