[Mesa-dev] [PATCH] renderonly: Initialize fields of struct winsys_handle.

Eric Anholt eric at anholt.net
Tue May 9 18:24:21 UTC 2017


vc4 was rejecting renderonly's import, because the offset field was
nonzero.
---
 src/gallium/auxiliary/renderonly/renderonly.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c
index 2fe10090163e..d3ed214f4e43 100644
--- a/src/gallium/auxiliary/renderonly/renderonly.c
+++ b/src/gallium/auxiliary/renderonly/renderonly.c
@@ -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;
-- 
2.11.0



More information about the mesa-dev mailing list