[Mesa-dev] [PATCH] egl/x11: Move dri2_format_for_depth prototype.

Vinson Lee vlee at freedesktop.org
Fri May 25 06:52:25 UTC 2018


Fix build error without DRI3.

  CC       drivers/dri2/platform_x11.lo
drivers/dri2/platform_x11.c:1010:1: error: no previous prototype for function 'dri2_format_for_depth' [-Werror,-Wmissing-prototypes]
dri2_format_for_depth(uint32_t depth)
^

Fixes: 473af0b541b2 ("egl/x11: deduplicate depth-to-format logic")
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/egl/drivers/dri2/egl_dri2.h          | 3 +++
 src/egl/drivers/dri2/platform_x11_dri3.h | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index adabc527f85b..b91a899e476c 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -523,4 +523,7 @@ dri2_init_surface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type,
 void
 dri2_fini_surface(_EGLSurface *surf);
 
+uint32_t
+dri2_format_for_depth(uint32_t depth);
+
 #endif /* EGL_DRI2_INCLUDED */
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.h b/src/egl/drivers/dri2/platform_x11_dri3.h
index e6fd01366978..96e7ee972d9f 100644
--- a/src/egl/drivers/dri2/platform_x11_dri3.h
+++ b/src/egl/drivers/dri2/platform_x11_dri3.h
@@ -38,7 +38,4 @@ extern struct dri2_egl_display_vtbl dri3_x11_display_vtbl;
 EGLBoolean
 dri3_x11_connect(struct dri2_egl_display *dri2_dpy);
 
-uint32_t
-dri2_format_for_depth(uint32_t depth);
-
 #endif
-- 
2.17.0



More information about the mesa-dev mailing list