<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 - Incorrect viewport range when GL_CLIP_ORIGIN is GL_UPPER_LEFT"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93813">93813</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Incorrect viewport range when GL_CLIP_ORIGIN is GL_UPPER_LEFT
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>10.6
</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>Mesa core
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jlegg@feralinteractive.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=121191" name="attach_121191" title="Test case">attachment 121191</a> <a href="attachment.cgi?id=121191&action=edit" title="Test case">[details]</a></span>
Test case
When GL_CLIP_ORIGIN is set to GL_UPPER_LEFT using glClipControl, the vertical
range of pixels that are written to during rendering does not match that which
was requested with glViewport unless the y offset is 0. It appears that during
rendering the y offset is always 0, and the height of the viewport is the
requested height minus the requested y offset (or 0 if that is negative).
However the GL_VIEWPORT values returned by glGet are what was originally
requested.
This was seen on both Intel Haswell on Ubuntu and AMD R9 270 on Fedora.
I have attached a test case. Examining the texture it produces with apitrace
shows it wrote to pixels 0 and 1 instead of pixels 1, 2, and 3 of a texture. It
should print "0, 1", but on affected machines it prints "1, 0". These values
are the contents of pixel 0 and 2. 0 is the cleared value before the draw, and
1 written in the draw (which uses a viewport of height 3 with y offset 1, so
only covers the second test pixel).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>