diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index d1b1cd6..e290c47 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -10601,6 +10601,7 @@ int vrend_renderer_export_query(struct pipe_resource *pres, */ export_query->out_num_fds = 0; export_query->out_fourcc = 0; + export_query->out_modifier = DRM_FORMAT_MOD_INVALID; if (export_query->in_export_fds) return -EINVAL; diff --git a/src/vrend_winsys.h b/src/vrend_winsys.h index 24b1e5b..6c9289f 100644 --- a/src/vrend_winsys.h +++ b/src/vrend_winsys.h @@ -34,6 +34,10 @@ #include "virglrenderer.h" +#ifndef DRM_FORMAT_MOD_INVALID +#define DRM_FORMAT_MOD_INVALID 0x00ffffffffffffffULL +#endif + struct virgl_gl_ctx_param; #ifdef HAVE_EPOXY_EGL_H diff --git a/src/vrend_winsys_gbm.c b/src/vrend_winsys_gbm.c index 578086d..65197b4 100644 --- a/src/vrend_winsys_gbm.c +++ b/src/vrend_winsys_gbm.c @@ -38,6 +38,7 @@ #include "util/u_memory.h" #include "pipe/p_state.h" +#include "vrend_winsys.h" #include "vrend_winsys_gbm.h" #include "virgl_hw.h" #include "vrend_debug.h" @@ -461,7 +462,7 @@ int virgl_gbm_export_query(struct gbm_bo *bo, struct virgl_renderer_export_query query->out_num_fds = 0; query->out_fourcc = 0; - query->out_modifier = 0; + query->out_modifier = DRM_FORMAT_MOD_INVALID; for (int plane = 0; plane < VIRGL_GBM_MAX_PLANES; plane++) { query->out_fds[plane] = -1; query->out_strides[plane] = 0;