<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - glGetTexLevelParameteriv broken for indirect rendering"
href="https://bugs.freedesktop.org/show_bug.cgi?id=59876">59876</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>glGetTexLevelParameteriv broken for indirect rendering
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Reporter</th>
<td>glynn@gclements.plus.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Component</th>
<td>GLX
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>With indirect rendering, glGetTexLevelParameteriv() is returning garbage, at
least for GL_TEXTURE_WIDTH and GL_TEXTURE_HEIGHT.
I don't know whether this is in libGL, XCB or the X server. I've tried it with
several X servers (including Xorg, Xvnc, Xvfb, Cygwin's XWin.exe and Xming),
but they're all based on the same underlying code base so that doesn't mean
much.
I managed to track it down as far as the USE_XCB branch of
__indirect_glGetTexLevelParameteriv() in src/glx/indirect.c. The reply contains
the following:
<span class="quote">> print *reply</span >
$7 = {
response_type = 1 '\001',
pad0 = 0 '\000',
sequence = 65,
length = 0,
pad1 = "\000\000\000",
n = 1,
datum = 256,
pad2 = "\230y'a\000\000\000\000\000\000\000"
}
As xcb_glx_get_tex_level_parameteriv_data_length(reply) (i.e. reply->n) is
non-zero, it expects to find the value at
xcb_glx_get_tex_level_parameteriv_data() (i.e. following the structure), but
the correct value (256) is actually in reply->datum (which would have been used
if reply->n was zero).</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>