Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,062
    • Issues 3,062
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 993
    • Merge requests 993
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Issues
  • #1167
Closed
Open
Issue created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

Textures seem to be byteswapped on big endian architectures

Submitted by Adam Stylinski

Assigned to Nouveau Project

Link to original bug (#109371)

Description

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

Version: 18.3

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking