From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Keith Packard" Subject: Re: [PATCH 6/7] anv: add VK_EXT_display_control to anv driver [v2] Date: Tue, 19 Jun 2018 22:31:46 -0700 Message-ID: <87d0wmowfx.fsf@keithp.com> References: <20180615025256.10657-1-keithp@keithp.com> <20180615025256.10657-7-keithp@keithp.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1106115479==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jason Ekstrand Cc: ML mesa-dev , Maling list - DRI developers List-Id: dri-devel@lists.freedesktop.org --===============1106115479== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jason Ekstrand writes: >> + if (allocator) >> + alloc =3D allocator; >> + else >> + alloc =3D &device->instance->alloc; >> > > This is what vk_alloc2 is for. :-) ... > And vk_free2 ... > This isn't needed if you're using vk_alloc2 Yeah, but I need to pass the allocator down to the wsi common code, and that doesn't have any way to touch the device driver allocator pointer. I bet I'm just missing something here. Help? >> + >> + fence =3D vk_zalloc2(&device->alloc, allocator, sizeof (*fence), 8, >> + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); >> > > Above you used vk_alloc and here you're using vk_zalloc. Mind picking > one? I don't think zalloc is needed but it doesn't hurt so I don't care > which. Thanks. Existing code is using zalloc for fences; I'll use that everywhere. > Indentation could be consistent between the two functions you add. I don= 't > care which style. Sure; these function names are kinda long. I've wrapped the first call after the ( > vk_free2? I've had to compute 'alloc' to pass into wsi_common; I figured I might as well use it. =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlsp5sIACgkQ2yIaaQAA ABH5gBAAp/W/2U9bbZheRM6Y+M3sGB/MfaUgdFRICrTrxUQ+8pav6zP5Dz/xVQHQ DlcyzMIgd+8rV1khsWwh/8pmSqWfTUgrpqGPmcwlJxKGMumMo0KOH9cPalNSCIUv gPYtHqojqPvDLgukMASGGLE1MeJSvVdGqkNQUVp1eI7vKRuztvg2KzmH72bQ38rZ ub8P3XkziYNuYD7YhvSSUaVAL9tmGDwHruIj/6hHMBmwfAW5ULZ/RzhnNj+Ngu9/ wYOg2gXV5WjwwyyucWUQgoi7+fIBq18j4veZNo2Z3YJCCObUPQoXRwSGzD2PH0+G xyBfbDu+QUOJIPyxt5CJDD62kjjmPHEx8H1C3kSavbAtCnqNKki76K4hbpOA5Aiy iXSRxfv8tJvQXezkfU+c6utsOm0ojBFbXZeBUD4mxI+tRdmJ0HyRdtbtxhMZCHXB qliGZiR7YU2lxd9+d+F0CXiWZw8i2ZHi2vowM1YmQ2qDBY7WhiWCZhaLjnF4OY0f 0gsRR7Ol45uRGu/t0CcOpusJM6w927CwRR6csLx1H5xZKPypHdC7GoDp6MP8LnT/ 552xVvdQZpr/pLxdJHNr6XVsTK6tI7pC7c4vLn4uKEuwvxiV9b3ffPf92Jv3GpMl T7rt7YI3toSTK+ffPmPtIjTUopV09ObgGUWFMaDLkOFUSV1txD8= =l4Oo -----END PGP SIGNATURE----- --=-=-=-- --===============1106115479== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1106115479==--