From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH 3/8] dri/intel: Add explicit size parameter to intel_region_alloc_for_fd Date: Wed, 06 Nov 2013 21:42:22 -0800 Message-ID: <86r4asydhd.fsf@miki.keithp.com> References: <1383618208-21310-1-git-send-email-keithp@keithp.com> <1383618208-21310-4-git-send-email-keithp@keithp.com> <20131105222300.GA5220@tokamak.local> <1383801467.26497.16.camel@RedTail> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0250659966==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id 240EA385CB for ; Wed, 6 Nov 2013 21:42:28 -0800 (PST) In-Reply-To: <1383801467.26497.16.camel@RedTail> 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: Christopher James Halse Rogers , Kristian =?utf-8?Q?H=C3=B8gsberg?= Cc: mesa3d-dev@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0250659966== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Christopher James Halse Rogers writes: > You've presumably noticed this already, but this is the wrong way round > - you're passing height * stride as pitch, and stride as size. This > makes for awesome rendering. Thanks for catching this; I've flipped them around, and also fixed the fact that these calls were passing '1' for cpp, which appears to not actually matter most of the time, but as the correct value was sitting there in the image structure for the taking, I added that as well. You reviewed this on IRC, so I'll be merging it into the commit on my branch, just putting it here for other people to look at: diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dr= i/i915/intel_screen.c index 38badec..3ac5aa2 100644 =2D-- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -608,8 +608,8 @@ intel_create_image_from_fds(__DRIscreen *screen, return NULL; =20 image->region =3D intel_region_alloc_for_fd(intelScreen, =2D 1, width, height, height * = strides[0], =2D strides[0], fds[0], "image"= ); + f->planes[0].cpp, width, heig= ht, strides[0], + height * strides[0], fds[0], = "image"); if (image->region =3D=3D NULL) { free(image); return NULL; diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dr= i/i965/intel_screen.c index 7571921..dcfde97 100644 =2D-- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -663,8 +663,8 @@ intel_create_image_from_fds(__DRIscreen *screen, return NULL; =20 image->region =3D intel_region_alloc_for_fd(intelScreen, =2D 1, width, height, height * = strides[0], =2D strides[0], fds[0], "image"= ); + f->planes[0].cpp, width, heig= ht, strides[0], + height * strides[0], fds[0], = "image"); if (image->region =3D=3D NULL) { free(image); return NULL; =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIVAwUBUnsoP9siGmkAAAARAQhPiA/9FBJcdXfiK9OnipE4//GNcfCpeGSBRJK1 bYMTrFiyXP81ltSWl6kQ74484kSVC/PMqbEVhlLSX/0lfgXZbsmGM5OibOt1TMoQ tSDnys/L2JHq9vWu1DKC2HRHjrMNI3fqONmQatsORIXSpg21Sxe6QLOrRgvZm5jc hSk3BDZpHjCK9ZP3L5BVTgQQY5xwWgQcRAXkHviCZQniBciySO0xGFgGDB6tRmqs BaEZBE580f8rkCPYK+r368WgqW7LFF0hFYLHifgjlDoCbGb/P/JY6PlmHsGv0+3h H4I/dG7FD3MxazNwOy+v1H9S0MZ9R28lar+DcFufGfU3gfdENuoAAFPOgLfCrWHL vR12jxQ1UtMXQd5xmn4JS3L55pjfuC4D3AW5EaBMBsLbqfL9z217ua0PmZyfjfsG 8SCuXwyR6bvakemWc2AYajz3I0CokXRmZgGm5eCG04SKwOTdWc2nTxJekmFzTHBJ NYOgjmbXF8oB6irju59tzrsoiD4qtGx6MOgr9msXgj0S6QwWchesTCYCAlaK0J9z fCVAyOUJ7grHTrq42BxU54uqLph1xAu/HrD7tPsMEO18unqGi8UP/yXKfq/WlovA ziI33alCO1bgKc+MCUE0VXqn/IQ+bEAoEExsyS1L3CBmzdMfINly+HEVC1k5lV+o R5eTj9uMT0o= =146u -----END PGP SIGNATURE----- --=-=-=-- --===============0250659966== 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 --===============0250659966==--