[Mesa-dev] [PATCH 6/7] i965: Clean up error handling for context creation.
Eric Anholt
eric at anholt.net
Fri Sep 27 11:11:14 PDT 2013
Kenneth Graunke <kenneth at whitecape.org> writes:
> On 09/26/2013 08:36 PM, Eric Anholt wrote:
>> The intel_screen.c used to be a dispatch to one of 3 driver functions, but
>> was down to 1, so it was kind of a waste. In addition, it was trying to
>> free all of the data that might have been partially freed in the kernel
>> 3.6 check (which comes after intelInitContext, and thus might have had
>> driverPrivate set and result in intelDestroyContext() doing work on the
>> freed data). By moving the driverPrivate setup earlier, we can use
>> intelDestroyContext() consistently and avoid such problems in the future.
>> ---
>> src/mesa/drivers/dri/i965/brw_context.c | 4 ++--
>> src/mesa/drivers/dri/i965/intel_context.c | 6 +++---
>> src/mesa/drivers/dri/i965/intel_screen.c | 28 +---------------------------
>> 3 files changed, 6 insertions(+), 32 deletions(-)
>
> Nice, I like this. I'm also working on a series to move a bunch of
> stuff from intelInitContext into brwCreateContext (with the goal of
> eventually killing the awkward split); I'll rebase that on your series.
>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Sweet. They're pretty hideous split like this, and I just couldn't work
up the motivation to do so myself.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130927/5bef71f3/attachment.pgp>
More information about the mesa-dev
mailing list