<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - A conditional discard in a fragment shader causes no depth writing at all"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93761">93761</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>A conditional discard in a fragment shader causes no depth writing at all
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>git
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Drivers/Gallium/radeonsi
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jlegg@feralinteractive.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>dri-devel@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=121116" name="attach_121116" title="Test case">attachment 121116</a> <a href="attachment.cgi?id=121116&action=edit" title="Test case">[details]</a></span>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>