[Mesa-dev] [PATCH 6/7] i965: Clean up error handling for context creation.
Kenneth Graunke
kenneth at whitecape.org
Thu Sep 26 21:25:15 PDT 2013
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>
More information about the mesa-dev
mailing list