From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 06/53] drm/i915/bdw: Introduce one context backing object per engine Date: Thu, 19 Jun 2014 12:57:34 +0200 Message-ID: References: <1402673891-14618-1-git-send-email-oscar.mateo@intel.com> <1402673891-14618-7-git-send-email-oscar.mateo@intel.com> <20140618201624.GW5821@phenom.ffwll.local> <92648605EABDA246B775AAB04C95A7A3013207DF@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C3936E879 for ; Thu, 19 Jun 2014 03:57:35 -0700 (PDT) Received: by mail-ie0-f170.google.com with SMTP id tr6so1849882ieb.15 for ; Thu, 19 Jun 2014 03:57:35 -0700 (PDT) In-Reply-To: <92648605EABDA246B775AAB04C95A7A3013207DF@IRSMSX103.ger.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Mateo Lozano, Oscar" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Thu, Jun 19, 2014 at 10:52 AM, Mateo Lozano, Oscar wrote: >> > v2: Leave the old backing object pointer behind. Daniel Vetter >> > suggested using a union, but it makes more sense to keep render_obj as >> > a NULL pointer behind, to make sure no one uses it incorrectly when >> > Execlists are enabled, similar to what we are doing with ring->buffer >> > (Rusty's API level 5). > > Not sure if you agree with this or you still prefer the union? Well the union has the same idea but using less space. Not really worth here though at all, so I'm ok with your approach. In any case subclassing is usually the better approach than having a union. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch