clover: Fix pipe_grid_info.indirect not being initialized.
authorHans de Goede <hdegoede@redhat.com>
Mon, 14 Mar 2016 14:01:05 +0000 (15:01 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 14 Mar 2016 21:12:42 +0000 (14:12 -0700)
After pipe_grid_info.indirect was introduced, clover was not modified
to set it causing it to pass uninitialized memory for it to launch_grid.

This commit fixes this by zero-ing the entire pipe_grid_info struct when
declaring it, to avoid similar problems popping-up in the future.

Cc: "11.2" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
[ Francisco Jerez: Trivial codestyle fix. ]
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/core/kernel.cpp

index 8396be915536111ebaeccc7e9aee0959ce4e8833..c12755b0420a8bf47d4e146b857374acfb1c34e6 100644 (file)
@@ -55,7 +55,7 @@ kernel::launch(command_queue &q,
    const auto reduced_grid_size =
       map(divides(), grid_size, block_size);
    void *st = exec.bind(&q, grid_offset);
-   struct pipe_grid_info info;
+   struct pipe_grid_info info = {};
 
    // The handles are created during exec_context::bind(), so we need make
    // sure to call exec_context::bind() before retrieving them.