From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 109371] New: Textures seem to be byteswapped on big endian architectures Date: Wed, 16 Jan 2019 00:36:08 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0157681472==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============0157681472== Content-Type: multipart/alternative; boundary="15475989680.DAd798A.18249" Content-Transfer-Encoding: 7bit --15475989680.DAd798A.18249 Date: Wed, 16 Jan 2019 00:36:08 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D109371 Bug ID: 109371 Summary: Textures seem to be byteswapped on big endian architectures Product: Mesa Version: 18.3 Hardware: PowerPC OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Reporter: kungfujesus06-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org QA Contact: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org 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_R= GBA and GL_UNSIGNED_BYTE. Matplotlib will do this when blit=3DTrue 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.=20=20 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 incor= rect ordering (this is probably a different bug). Easiest way to demonstrate the bug: svn co https://svn.code.sf.net/p/doomlegacy/svn/legacy_one/trunk doomlegacy cd doomlegacy make OS=3DLINUX make cd bin Grab this archive: https://sourceforge.net/projects/doomlegacy/files/1.47.2/doomlegacy_1.47.2_= common.zip/download, unzip it, extract legacy.wad into the bin directory Grab this archive: https://github.com/freedoom/freedoom/releases/download/v0.11.3/freedoom-0.1= 1.3.zip, extract, move freedoom1.wad into the bin directory. Then do: ./doomlegacy -iwad freedoom1.wad -opengl --=20 You are receiving this mail because: You are the QA Contact for the bug. You are the assignee for the bug.= --15475989680.DAd798A.18249 Date: Wed, 16 Jan 2019 00:36:08 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 109371
Summary Textures seem to be byteswapped on big endian architectures
Product Mesa
Version 18.3
Hardware PowerPC
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component Drivers/DRI/nouveau
Assignee nouveau@lists.freedesktop.org
Reporter kungfujesus06@gmail.com
QA Contact nouveau@lists.freedesktop.org

When using an NV43 based GPU on a PPC64 kernel with a 64 bit u=
serspace, it
seems applications will have byte swapped textures when specified with GL_R=
GBA
and GL_UNSIGNED_BYTE.  Matplotlib will do this when blit=3DTrue 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.=20=20

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 incor=
rect
ordering (this is probably a different bug).

Easiest way to demonstrate the bug:
svn co https://svn.code.sf.net/p/doomlegacy/svn/legacy_one/trunk doomlegacy
cd doomlegacy
make OS=3DLINUX
make
cd bin
Grab this archive:
https://sourceforge.net/projects/doomlegacy=
/files/1.47.2/doomlegacy_1.47.2_common.zip/download,
unzip it, extract legacy.wad into the bin directory
Grab this archive:
https://github.com/freedoom/freedoom/releases/download/=
v0.11.3/freedoom-0.11.3.zip,
extract, move freedoom1.wad into the bin directory.
Then do:
./doomlegacy -iwad freedoom1.wad -opengl


You are receiving this mail because:
  • You are the QA Contact for the bug.
  • You are the assignee for the bug.
= --15475989680.DAd798A.18249-- --===============0157681472== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KTm91dmVhdSBt YWlsaW5nIGxpc3QKTm91dmVhdUBsaXN0cy5mcmVlZGVza3RvcC5vcmcKaHR0cHM6Ly9saXN0cy5m cmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9ub3V2ZWF1Cg== --===============0157681472==--