renderonly: Initialize fields of struct winsys_handle.
authorEric Anholt <eric@anholt.net>
Tue, 9 May 2017 18:24:21 +0000 (11:24 -0700)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Mon, 15 May 2017 04:38:45 +0000 (06:38 +0200)
vc4 was rejecting renderonly's import, because the offset field was
nonzero.

Fixes: 848b49b288f ("gallium: add renderonly library")
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/auxiliary/renderonly/renderonly.c

index 2fe10090163e325471a6dc3a84b4e5382480c40b..d3ed214f4e43debd7db58992eaeef551625421af 100644 (file)
@@ -117,6 +117,7 @@ renderonly_create_kms_dumb_buffer_for_resource(struct pipe_resource *rsc,
    }
 
    /* import dumb buffer */
+   memset(&handle, 0, sizeof(handle));
    handle.type = DRM_API_HANDLE_TYPE_FD;
    handle.handle = prime_fd;
    handle.stride = create_dumb.pitch;