We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4009

Summary: SDL_ConvertSurface not works on ppc64le
Product: SDL Reporter: Andrei Karas <akaras>
Component: mainAssignee: Sam Lantinga <slouken>
Status: WAITING --- QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: sezeroz
Version: 1.2.15   
Hardware: PowerPC   
OS: Linux   

Description Andrei Karas 2017-12-24 17:37:09 UTC
If try to use SDL_ConvertSurface for convert pixel format from RRGGBBAA to AABBGGRR it do nothing on ppc64el.

This part of code from unit tests:

Same code here: https://gitlab.com/manaplus/manaplus/blob/dc3c3595855252304a18d15d6c90dcb98927036e/src/unittests/sdl.cc#L183-256

On ppc64el pixels not converted at all. For all other supported by debian arches this test passed. Also classical ppc works fine too (in QEMU).

Error build log from debian build system: https://buildd.debian.org/status/fetch.php?pkg=manaplus&arch=ppc64el&ver=1.7.11.11-1&stamp=1511365837&raw=0
(see line unittests/sdl.cc:238: FAILED:)

Here all debian builds: https://buildd.debian.org/status/package.php?p=manaplus
Comment 1 Sam Lantinga 2018-01-03 18:03:14 UTC
Do you have a patch? I don't have access to a ppc64el machine for debugging.
Comment 2 Andrei Karas 2018-01-03 18:14:56 UTC
sadly no. I not sure what and where to change.
Comment 3 Sam Lantinga 2018-01-03 18:36:44 UTC
Can you debug on the system? I can walk you through it, if you want.
Comment 4 Andrei Karas 2018-01-03 19:09:34 UTC
I can use qemu. it slow.
But can try to follow some instructions.
Comment 5 Sam Lantinga 2018-01-03 21:57:57 UTC
Maybe you can instead give me instructions on setting up qemu to reproduce this?
Comment 6 Andrei Karas 2018-01-04 00:10:45 UTC
I did install long ago, can forgot something. But here steps:
1. create disk for vm. I using 10GB qcow2 format
2. download iso http://d-i.debian.org/daily-images/ppc64el/daily/netboot/mini.iso
3. run qemu with this command (using 4 cores):

qemu-system-ppc64 \
-smp cores=4,threads=1,sockets=1 \
-m 2048 \
-balloon virtio \
-hda /path/disk.qcow2 \
-cdrom /path//mini.iso \
-netdev user,id=user.0 -device e1000,netdev=user.0

4. install debian.
I installed with DE/WM but all work did in console. Using env variable: SDL_VIDEODRIVER=dummy

If something not works, i can try upload my image.
Comment 8 Andrei Karas 2018-02-21 22:11:17 UTC
No, this patch not fixed SDL_ConvertSufrace. Probably it may fix other issues, but my tests stopped at SDL_ConvertSufrace.