From patchwork Tue Nov 10 15:52:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 59076 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAAFsCXO009893 for ; Tue, 10 Nov 2009 15:54:12 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 636EA9EF96; Tue, 10 Nov 2009 07:54:12 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fmsmga101.fm.intel.com (mga05.intel.com [192.55.52.89]) by gabe.freedesktop.org (Postfix) with ESMTP id 8CC549EF92 for ; Tue, 10 Nov 2009 07:54:08 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 10 Nov 2009 07:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,716,1249282800"; d="scan'208";a="745583699" Received: from unknown (HELO localhost.localdomain) ([10.255.16.76]) by fmsmga001.fm.intel.com with ESMTP; 10 Nov 2009 08:00:34 -0800 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 10 Nov 2009 15:52:21 +0000 Message-Id: <1257868341-29737-2-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 1.6.5.2 In-Reply-To: <1257868341-29737-1-git-send-email-chris@chris-wilson.co.uk> References: <1257868341-29737-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH] i915: Do not force the incoming source alpha to 1. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org diff --git a/src/i915_render.c b/src/i915_render.c index f64e031..8d8fde4 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -446,7 +446,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) { intel_screen_private *intel = intel_get_screen_private(scrn); int op = intel->i915_render_state.op; - PicturePtr source_picture = intel->render_source_picture; PicturePtr mask_picture = intel->render_mask_picture; PicturePtr dest_picture = intel->render_dest_picture; PixmapPtr mask = intel->render_mask; @@ -600,10 +599,6 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) i915_fs_texldp(FS_R0, FS_S0, FS_T0); } - /* If the texture lacks an alpha channel, force the alpha to 1. */ - if (PICT_FORMAT_A(source_picture->format) == 0) - i915_fs_mov_masked(FS_R0, MASK_W, i915_fs_operand_one()); - src_reg = FS_R0; } @@ -653,7 +648,9 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn) } } if (dst_format == COLR_BUF_8BIT) - i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W)); + i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W)); + if (PICT_FORMAT_A(dest_picture->format) == 0) + i915_fs_mov_masked(FS_OC, MASK_W, i915_fs_operand_one()); FS_END(); }