From b7818b8c36f9850acb17402d05593cff6c2532f0 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 4 Nov 2013 17:29:08 -0800 Subject: dri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The __DRI_IMAGE_FORMAT codes are used by the image extension, drivers need to be able to translate between them. Instead of duplicating this translation in each driver, create a shared version. Signed-off-by: Keith Packard Reviewed-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/mesa/drivers/dri/common/dri_util.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/drivers/dri/common/dri_util.h') diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index b3c21651611..7fab3e5f720 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -273,6 +273,12 @@ struct __DRIdrawableRec { } dri2; }; +extern uint32_t +driGLFormatToImageFormat(gl_format format); + +extern gl_format +driImageFormatToGLFormat(uint32_t image_format); + extern void dri2InvalidateDrawable(__DRIdrawable *drawable); -- cgit v1.2.3