summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/dri_util.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-11-04 17:29:08 -0800
committerEric Anholt <eric@anholt.net>2013-11-07 19:08:09 -0800
commitb7818b8c36f9850acb17402d05593cff6c2532f0 (patch)
tree5e3fb6f0068ba0baaba62de326b883d1c5ca2cd3 /src/mesa/drivers/dri/common/dri_util.h
parentaba6b84ce52c27b642d01bafd1703386bda97f3a (diff)
dri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_*
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 <keithp@keithp.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.h')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h6
1 files changed, 6 insertions, 0 deletions
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);