From 3ebb0ffba4b0361f0994193a7e3db5dafb7e892b Mon Sep 17 00:00:00 2001 From: Lepton Wu Date: Thu, 12 Nov 2020 15:49:41 -0800 Subject: [PATCH] virgl/gbm: Make it compile on old version of mesa. Add definition of GBM_FORMAT_ABGR16161616F when it's missed so we can compile against mesa version before 20.0 Signed-off-by: Lepton Wu Reviewed-by: Chia-I Wu --- src/vrend_winsys_gbm.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vrend_winsys_gbm.h b/src/vrend_winsys_gbm.h index 53b7d0b..6be6b0a 100644 --- a/src/vrend_winsys_gbm.h +++ b/src/vrend_winsys_gbm.h @@ -35,6 +35,11 @@ #define VIRGL_GBM_MAX_PLANES 4 #endif +/* GBM_FORMAT_ABGR16161616F was added since mesa 20.0 */ +#ifndef GBM_FORMAT_ABGR16161616F +#define GBM_FORMAT_ABGR16161616F __gbm_fourcc_code('A', 'B', '4', 'H') /* [63:0] A:B:G:R 16:16:16:16 little endian */ +#endif + /* * If fd >= 0, virglrenderer owns the fd since it was opened via a rendernode * query. If fd < 0, the gbm device was opened with the fd provided by the