OSDN Git Service

dri/common: Add functions mapping MESA_FORMAT_* <-> __DRI_IMAGE_FORMAT_*
authorKeith Packard <keithp@keithp.com>
Tue, 5 Nov 2013 01:29:08 +0000 (17:29 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 8 Nov 2013 03:08:09 +0000 (19:08 -0800)
commitb7818b8c36f9850acb17402d05593cff6c2532f0
tree5e3fb6f0068ba0baaba62de326b883d1c5ca2cd3
parentaba6b84ce52c27b642d01bafd1703386bda97f3a
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>
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h