From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 93761] A conditional discard in a fragment shader causes no depth writing at all Date: Mon, 18 Jan 2016 18:08:25 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1042721465==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 9CE0C6E12B for ; Mon, 18 Jan 2016 10:08:25 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1042721465== Content-Type: multipart/alternative; boundary="14531405050.bDAC048f8.22000"; charset="UTF-8" --14531405050.bDAC048f8.22000 Date: Mon, 18 Jan 2016 18:08:25 +0000 MIME-Version: 1.0 Content-Type: text/plain https://bugs.freedesktop.org/show_bug.cgi?id=93761 Bug ID: 93761 Summary: A conditional discard in a fragment shader causes no depth writing at all Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/Gallium/radeonsi Assignee: dri-devel@lists.freedesktop.org Reporter: jlegg@feralinteractive.com QA Contact: dri-devel@lists.freedesktop.org Created attachment 121116 --> https://bugs.freedesktop.org/attachment.cgi?id=121116&action=edit Test case When rendering to an FBO with only a GL_DEPTH_COMPONENT16 depth buffer, with depth testing enabled, if a fragment shader has a conditional discard, nothing is written to the depth buffer for pixels which should not be discarded. Platform: Fedora 22 x86_64 Mesa version: tested both git eaf7ec9 (from griever-mesa-git copr) and 10.6.9 (the default mesa package with Fedora 22). The bug occurred on both. GL Renderer string: Gallium 0.4 on AMD PITCAIRN (DRM 2.43.0, LLVM 3.7.1) GPU: AMD R9 270 with 2GB VRAM Workaround: If you write to gl_FragDepth, only the intentionally discarded pixels are discarded. I've attached a test case demonstrating the problem. It will fail an assertion on the machine with this bug. It should draw only on the even columns of pixels in the depth buffer, but nothing is drawn. -- You are receiving this mail because: You are the assignee for the bug. --14531405050.bDAC048f8.22000 Date: Mon, 18 Jan 2016 18:08:25 +0000 MIME-Version: 1.0 Content-Type: text/html
Bug ID 93761
Summary A conditional discard in a fragment shader causes no depth writing at all
Product Mesa
Version git
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component Drivers/Gallium/radeonsi
Assignee dri-devel@lists.freedesktop.org
Reporter jlegg@feralinteractive.com
QA Contact dri-devel@lists.freedesktop.org

Created attachment 121116 [details]
Test case

When rendering to an FBO with only a GL_DEPTH_COMPONENT16 depth buffer, with
depth testing enabled, if a fragment shader has a conditional discard, nothing
is written to the depth buffer for pixels which should not be discarded.

Platform: Fedora 22 x86_64
Mesa version: tested both git eaf7ec9 (from griever-mesa-git copr) and 10.6.9
(the default mesa package with Fedora 22). The bug occurred on both.
GL Renderer string: Gallium 0.4 on AMD PITCAIRN (DRM 2.43.0, LLVM 3.7.1)
GPU: AMD R9 270 with 2GB VRAM

Workaround: If you write to gl_FragDepth, only the intentionally discarded
pixels are discarded.

I've attached a test case demonstrating the problem. It will fail an assertion
on the machine with this bug. It should draw only on the even columns of pixels
in the depth buffer, but nothing is drawn.


You are receiving this mail because:
  • You are the assignee for the bug.
--14531405050.bDAC048f8.22000-- --===============1042721465== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1042721465==--