<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 - Textures seem to be byteswapped on big endian architectures"
href="https://bugs.freedesktop.org/show_bug.cgi?id=109371">109371</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Textures seem to be byteswapped on big endian architectures
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr>
<tr>
<th>Version</th>
<td>18.3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PowerPC
</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/DRI/nouveau
</td>
</tr>
<tr>
<th>Assignee</th>
<td>nouveau@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>kungfujesus06@gmail.com
</td>
</tr>
<tr>
<th>QA Contact</th>
<td>nouveau@lists.freedesktop.org
</td>
</tr></table>
<p>
<div>
<pre>When using an NV43 based GPU on a PPC64 kernel with a 64 bit userspace, it
seems applications will have byte swapped textures when specified with GL_RGBA
and GL_UNSIGNED_BYTE. Matplotlib will do this when blit=True for the plot
routines, and several games will have this issue. In particular, for Legacy
Doom, I've found that if I swap the textures so that they are A,B,G,R just
before the textures are mapped, everything is correct.
I also found that doing glPixelStorei(GL_UNPACK_BYTES, GL_TRUE) and choosing
GL_UNSIGNED_INT_8_8_8_8 as the representation seemed to also remedy this. I
found that the _REV variant didn't byte swap the textures back to the incorrect
ordering (this is probably a different bug).
Easiest way to demonstrate the bug:
svn co <a href="https://svn.code.sf.net/p/doomlegacy/svn/legacy_one/trunk">https://svn.code.sf.net/p/doomlegacy/svn/legacy_one/trunk</a> doomlegacy
cd doomlegacy
make OS=LINUX
make
cd bin
Grab this archive:
<a href="https://sourceforge.net/projects/doomlegacy/files/1.47.2/doomlegacy_1.47.2_common.zip/download">https://sourceforge.net/projects/doomlegacy/files/1.47.2/doomlegacy_1.47.2_common.zip/download</a>,
unzip it, extract legacy.wad into the bin directory
Grab this archive:
<a href="https://github.com/freedoom/freedoom/releases/download/v0.11.3/freedoom-0.11.3.zip">https://github.com/freedoom/freedoom/releases/download/v0.11.3/freedoom-0.11.3.zip</a>,
extract, move freedoom1.wad into the bin directory.
Then do:
./doomlegacy -iwad freedoom1.wad -opengl</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>