From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 0/8] Add DRIimage-based DRI3/Present loader Date: Tue, 05 Nov 2013 08:40:22 -0800 Message-ID: <8661s6kdjd.fsf@miki.keithp.com> References: <1383618208-21310-1-git-send-email-keithp@keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1326212112==" Return-path: In-Reply-To: <1383618208-21310-1-git-send-email-keithp@keithp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: mesa-dev@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1326212112== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Keith Packard 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; =20=20=20=20=20=20=20=20 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); =09 /** * 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 pas= sed * into __DRIdri2ExtensionRec::createNewDrawable */ void (*flushFrontBuffer)(__DRIdrawable *driDrawable, void *loaderPriva= te); Each driver will need to have a path to use the image loader to get color buffers using the DRIimageLoaderExtension getBuffers function. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIVAwUBUnkfdtsiGmkAAAARAQhMxQ/6AjQQqY46GuSN7a8utoWKcHZ3GCmVFzZ6 xMa3S6Ey+eq61uK2YJnCTap96ddMWtIAlwTKyhgwFWwfYSTOeT72puboILk6su2a /vtm7QHkWnGuBdxyW4EmsdgUShzHLuyOE8ZgYuCyzPvj1VM3ptA6Q97Z3URZsWHh RosgGPnpdkJDey+SzEpcYkmNduO1HUhZqSwfTakGwMGlbxVrSeIWtdbp1h1stoRt +ZoD82fI4oG2R7Xr+6+aQSWNzAnnNuK/cTaER+e+KX4Fo0bYcQDvLUJ7YJ9A9yOS 6id01fQCBi+hzm12qRL7E5EijFPDzSHa452LLpF/6mxNlefqDusnpFVGocal2B6R +JkLxT1GMtQxJFK7NyJkvQPtyNRGuxiy4VzNQQJteEWPEAu9l9IGGEXJn8fy8ZfU 21J2d8nkLnxsuLNJA3eGNAhFf79aUcrD8evVm0soIddvBWcYPztYkcvvGulXsD4z kED1fEXanOCYC1u5SAF/nOij1NIdd5Tq2V2I9jrUAcxN70JbVsUalXqKUSyfPgOL GKdsmvxBgqAQHJY4gFW7ItZm9WPJ573lW0MVqqShtH70dX806aE4bGHQ8vHw1yH5 ux0Nw14/cP4R/wBzpRH5OBk88Kb7Oj9Ecq0ixYHmfRC6m3dXyEEa0ue60jYe8i7v 0zDoODpXMcc= =iaYh -----END PGP SIGNATURE----- --=-=-=-- --===============1326212112== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1326212112==--