Keith Packard <keithp@xxxxxxxxxx> writes: > This sequence first adds a a couple of new DRIimage extensions to the > dri/common, dri/i915 and dri/i965 directories which define a > loader-independent API for managing window system operations. > > The last patch adds a new DRI3000 loader using those new interfaces. I've figured out that I can also re-use dri2CreateNewScreen2 for the image driver bits, as long as I change that function to also look up the image loader. That means there are *no* new dri_util functions needed. To recap, the changes needed to support using the DRIimageExtension interfaces for allocating buffers from the driver in the loader are: DRIimageDriverExtension A proper subset of DRIdri2DriverExtension, which uses the same five functions involved in creating new objects: /* Common DRI functions, shared with DRI2 */ __DRIcreateNewScreen2 createNewScreen2; __DRIcreateNewDrawable createNewDrawable; __DRIcreateNewContext createNewContext; __DRIcreateContextAttribs createContextAttribs; __DRIgetAPIMask getAPIMask; DRIimageLoaderExtension Contains just two functions, one to allocate buffers and one to copy the fake front to the real front when flushing stuff. /** * Allocate color buffers. * * \param driDrawable * \param width Width of allocated buffers * \param height Height of allocated buffers * \param format one of __DRI_IMAGE_FORMAT_* * \param stamp Address of variable to be updated when * getBuffers must be called again * \param loaderPrivate The loaderPrivate for driDrawable * \param buffer_mask Set of buffers to allocate * \param buffers Returned buffers */ int (*getBuffers)(__DRIdrawable *driDrawable, int *width, int *height, unsigned int format, uint32_t *stamp, void *loaderPrivate, uint32_t buffer_mask, struct __DRIimageList *buffers); /** * Flush pending front-buffer rendering * * Any rendering that has been performed to the * fake front will be flushed to the front * * \param driDrawable Drawable whose front-buffer is to be flushed * \param loaderPrivate Loader's private data that was previously passed * into __DRIdri2ExtensionRec::createNewDrawable */ void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPrivate); Each driver will need to have a path to use the image loader to get color buffers using the DRIimageLoaderExtension getBuffers function. -- keith.packard@xxxxxxxxx
Attachment:
pgpqivQxbiFo4.pgp
Description: PGP signature
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel