All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 109371] New: Textures seem to be byteswapped on big endian architectures
@ 2019-01-16  0:36 bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
       [not found] ` <bug-109371-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  0 siblings, 1 reply; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2019-01-16  0:36 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2040 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=109371

            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_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 https://svn.code.sf.net/p/doomlegacy/svn/legacy_one/trunk doomlegacy
cd doomlegacy
make OS=LINUX
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.

[-- Attachment #1.2: Type: text/html, Size: 3614 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-18 20:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-16  0:36 [Bug 109371] New: Textures seem to be byteswapped on big endian architectures bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-109371-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2019-01-16  0:40   ` [Bug 109371] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-16  5:41   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-01-19 20:31   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2019-09-18 20:47   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.