From patchwork Sat Dec 14 01:25:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Packard X-Patchwork-Id: 3343941 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 65A9FC0D4A for ; Sat, 14 Dec 2013 01:26:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4B88203B6 for ; Sat, 14 Dec 2013 01:26:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D677020263 for ; Sat, 14 Dec 2013 01:26:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A8A4FB886; Fri, 13 Dec 2013 17:26:12 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id C0F55FB342; Fri, 13 Dec 2013 17:25:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 574EE1488008; Fri, 13 Dec 2013 17:25:58 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id AEhjk4p4mgcN; Fri, 13 Dec 2013 17:25:55 -0800 (PST) Received: by keithp.com (Postfix, from userid 1033) id 9C2BF1488011; Fri, 13 Dec 2013 17:25:35 -0800 (PST) Received: from miki.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4B7A41498013; Fri, 13 Dec 2013 17:25:35 -0800 (PST) Received: by miki.keithp.com (Postfix, from userid 1001) id D4B46EB4; Fri, 13 Dec 2013 17:25:31 -0800 (PST) From: Keith Packard To: mesa-dev@lists.freedesktop.org Subject: [PATCH 16/18] gallium/dri: fix unsetting of format when encountering depth/stencil Date: Fri, 13 Dec 2013 17:25:28 -0800 Message-Id: <1386984330-26074-17-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.8.4.4 In-Reply-To: <1386984330-26074-1-git-send-email-keithp@keithp.com> References: <1386984330-26074-1-git-send-email-keithp@keithp.com> Cc: Ben Skeggs , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Skeggs Signed-off-by: Ben Skeggs Signed-off-by: Keith Packard --- src/gallium/state_trackers/dri/drm/dri2.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 03b93ae..a9d6a10 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -517,6 +517,17 @@ dri_image_allocate_textures(struct dri_context *ctx, if (pf == PIPE_FORMAT_NONE) continue; + switch (statts[i]) { + case ST_ATTACHMENT_FRONT_LEFT: + buffer_mask |= __DRI_IMAGE_BUFFER_FRONT; + break; + case ST_ATTACHMENT_BACK_LEFT: + buffer_mask |= __DRI_IMAGE_BUFFER_BACK; + break; + default: + continue; + } + switch (pf) { case PIPE_FORMAT_B5G6R5_UNORM: image_format = __DRI_IMAGE_FORMAT_RGB565; @@ -534,17 +545,6 @@ dri_image_allocate_textures(struct dri_context *ctx, image_format = __DRI_IMAGE_FORMAT_NONE; break; } - - switch (statts[i]) { - case ST_ATTACHMENT_FRONT_LEFT: - buffer_mask |= __DRI_IMAGE_BUFFER_FRONT; - break; - case ST_ATTACHMENT_BACK_LEFT: - buffer_mask |= __DRI_IMAGE_BUFFER_BACK; - break; - default: - continue; - } } (*sPriv->image.loader->getBuffers) (dPriv,