dri: add __DRIimageLoaderExtension and __DRIimageDriverExtension
authorKeith Packard <keithp@keithp.com>
Tue, 5 Nov 2013 02:09:51 +0000 (18:09 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 8 Nov 2013 03:08:09 +0000 (19:08 -0800)
commit442442026eb241f05f2b7c03da304e0be047a7da
tree004956fd32cda29d0d0c8cf7edb5581ef0a7681a
parent1f085ba18fb11ca7d378bb2b4423702b1c823786
dri: add __DRIimageLoaderExtension and __DRIimageDriverExtension

These provide an interface between the driver and the loader to allocate
color buffers through the DRIimage extension interface rather than through a
loader-specific extension (as is used by DRI2, for instance).

The driver uses the loader 'getBuffers' interface to allocate color buffers.

The loader uses the createNewScreen2, createNewDrawable, createNewContext,
getAPIMask and createContextAttribs APIS (mostly shared with DRI2).

This interface will work with the DRI3 loader, and should also work with GBM
and other loaders so that drivers need not be customized for each new loader
interface, as long as they provide this image interface.

v2: Fix build of i915 and i965 together (by anholt)

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 files changed:
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/common/dri_util.c
src/mesa/drivers/dri/common/dri_util.h
src/mesa/drivers/dri/i915/intel_context.c
src/mesa/drivers/dri/i915/intel_mipmap_tree.c
src/mesa/drivers/dri/i915/intel_mipmap_tree.h
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i915/intel_screen.h
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
src/mesa/drivers/dri/i965/intel_mipmap_tree.h
src/mesa/drivers/dri/i965/intel_screen.c