From patchwork Tue Jun 3 21:52:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Graunke X-Patchwork-Id: 4291151 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EDACB9F1D6 for ; Tue, 3 Jun 2014 21:52:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2293D20254 for ; Tue, 3 Jun 2014 21:52:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1154420253 for ; Tue, 3 Jun 2014 21:52:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BB386E06C; Tue, 3 Jun 2014 14:52:16 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from homiemail-a99.g.dreamhost.com (homie.mail.dreamhost.com [208.97.132.208]) by gabe.freedesktop.org (Postfix) with ESMTP id 9407D6E06C for ; Tue, 3 Jun 2014 14:52:15 -0700 (PDT) Received: from homiemail-a99.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTP id D33ECFB0075; Tue, 3 Jun 2014 14:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=whitecape.org; h=from:to :cc:subject:date:message-id; s=whitecape.org; bh=Gttc558QSFrplvr r+W12NEwWtAE=; b=ABMhU8W3kjRQF1YBzYwQGTuhHHw+aBYThoOlZLL5oZ7fbvm VZujM5lSuIREj7ITiVTrr7tQ28nWQ8CLo6f9Uhc68NWuN7J460PKX8gGoA4M8Ry+ SVcraa2XT5DRt+xm4objliY8/Le3IALLrOqPYEC8s4QMcSAxzlcQd0zFhejs= Received: from zidane.ak.intel.com (fruit.freedesktop.org [131.252.210.190]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: kenneth@whitecape.org) by homiemail-a99.g.dreamhost.com (Postfix) with ESMTPSA id 5700DFB0073; Tue, 3 Jun 2014 14:52:13 -0700 (PDT) From: Kenneth Graunke To: intel-gfx@lists.freedesktop.org Date: Tue, 3 Jun 2014 14:52:30 -0700 Message-Id: <1401832350-10171-1-git-send-email-kenneth@whitecape.org> X-Mailer: git-send-email 1.9.1 Cc: Ben Widawsky Subject: [Intel-gfx] [PATCH] rendercopy/gen8: Also emit 3DSTATE_WM_DEPTH_STENCIL. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 rendercopy was failing to emit 3DSTATE_WM_DEPTH_STENCIL, which is a new packet on Broadwell. Mesa emits this packet. This appears to fix various tests on a fresh boot, when Mesa has never run. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78890 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78891 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78935 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78936 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78937 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78938 Signed-off-by: Kenneth Graunke Cc: Ben Widawsky Reviewed-by: Ben Widawsky Tested-by: Guo Jinxian --- lib/gen8_render.h | 1 + lib/rendercopy_gen8.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/gen8_render.h b/lib/gen8_render.h index fffc100..0eec80c 100644 --- a/lib/gen8_render.h +++ b/lib/gen8_render.h @@ -48,6 +48,7 @@ GEN6_3D(3, 0, 0x21) #define GEN8_3DSTATE_PS_BLEND GEN6_3D(3, 0, 0x4d) # define GEN8_PS_BLEND_HAS_WRITEABLE_RT (1 << 30) +#define GEN8_3DSTATE_WM_DEPTH_STENCIL GEN6_3D(3, 0, 0x4e) #define GEN8_3DSTATE_PS_EXTRA GEN6_3D(3,0, 0x4f) # define GEN8_PSX_PIXEL_SHADER_VALID (1 << 31) # define GEN8_PSX_ATTRIBUTE_ENABLE (1 << 8) diff --git a/lib/rendercopy_gen8.c b/lib/rendercopy_gen8.c index 6f5a698..e7567d2 100644 --- a/lib/rendercopy_gen8.c +++ b/lib/rendercopy_gen8.c @@ -816,6 +816,10 @@ gen8_emit_ps(struct intel_batchbuffer *batch, uint32_t kernel) { static void gen8_emit_depth(struct intel_batchbuffer *batch) { + OUT_BATCH(GEN8_3DSTATE_WM_DEPTH_STENCIL | (3 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + OUT_BATCH(GEN7_3DSTATE_DEPTH_BUFFER | (8-2)); OUT_BATCH(0); OUT_BATCH(0);