Opened 3 years ago
Last modified 6 months ago
#14452 new defect
TETRAEDGE: Syberia 1/2 very slow video rendering issues in menus
| Reported by: | dwatteau | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | Engine: Tetraedge |
| Version: | Keywords: | performance, theora | |
| Cc: | Game: | Syberia 1 |
Description
I have a late PowerBook G4 running OSX Leopard, Debian and OpenBSD. I'm testing the Syberia 1 & 2 Macintosh games from GOG with a recent build from the master branch.
The games do start, but there are various rendering issues (see the attached screenshots) and moreover everything is extremely slow (whether in OpenGL or TinyGL mode), to the point that even moving the cursor to the small hitbox of the "New game" or "OK" buttons takes ages.
For some reason, Syberia 2 has a more tolerable framerate than Syberia 1. Maybe it's related to the bigger video in the menu for Syberia 1? For reference, Grim Fandango, Escape from Monkey Island and The Longest Journey run pretty well on the same machine.
I'm attaching some logs for reference. Some come from the Instruments and OpenGL Profiler OSX apps. Looking at top, it looks like the game is being quite CPU-bound.
Attachments (9)
Change History (15)
by , 3 years ago
| Attachment: | Instruments ScummVM CPU.trace.zip added |
|---|
by , 3 years ago
| Attachment: | opengl-profiler-syberia-macppc-trace.txt.gz added |
|---|
OpenGL Profiler trace for Syberia (gzip'd because it's big)
by , 3 years ago
| Attachment: | opengl-profiler-syberia-macppc-function-calls.txt added |
|---|
OpenGL Profiler function calls for Syberia
by , 3 years ago
| Attachment: | syberia-macppc1.png added |
|---|
Syberia 1 rendering issues in the menu (1/2)
by , 3 years ago
| Attachment: | syberia-macppc2.png added |
|---|
Syberia 1 rendering issues in the menu (2/2)
by , 3 years ago
| Attachment: | scummvm_d6_syberia_osx_leopard.txt added |
|---|
ScummVM -d6 output from OSX Leopard
by , 3 years ago
| Attachment: | scummvm_d6_syberia_openbsd69.txt added |
|---|
ScummVM -d6 output from OpenBSD on the same machine
comment:1 by , 3 years ago
Thanks for all the data. I haven't done anything to optimize the video render path and it involves a few copies, so I'm sure it can be improved.
Unfortunately it seems Instruments is not backward-compatible because it won't open that trace on my Mac, but I can probably improve things anyway just by looking at the TeTheora->TeImage->Te3DTexture copies.
As for the graphic corruption, they look like classic endian-ness mistakes somewhere (probably in the use of TeColor class as direct data for GL) so I can probably look into those too.
by , 3 years ago
| Attachment: | instruments-scummvm-cpu-tetraedge-macppc.png added |
|---|
Tetraedge CPU usage in Instruments 1.5 on OSX Leopard PPC
comment:2 by , 3 years ago
Thank you for looking into this!
Yes, indeed it looks like newer versions of Instruments can't load older .trace files. Here's a screenshot of the main points of CPU usage, if I understand this tool properly (I'm not very used to it).
comment:3 by , 3 years ago
FWIW, the menu now renders correctly (as far as I can say) with this PR: <https://github.com/scummvm/scummvm/pull/5035>, but the embedded videos inside them are still quite slow, especially in Syberia 1 where it prevents me from reaching the "New game" button.
Otherwise, the games appear to work correctly on big-endian, from a quick test :)
So yeah, there's maybe something to be optimized around TeTheora.
comment:4 by , 3 years ago
| Keywords: | performance theora added; big endian removed |
|---|---|
| Summary: | TETRAEDGE: Syberia 1/2 rendering issues on big-endian → TETRAEDGE: Syberia 1/2 very slow video rendering issues in menus |
comment:5 by , 3 years ago
The big endian fix mentioned in the previous post looks like it should also be applied in quite a few other places in the Tetraedge engine where Graphics::PixelFormat(4, 8, 8, 8, 8, 0, 8, 16, 24) is used unconditionally.
comment:6 by , 6 months ago
I wanted to refresh this issue. I've tested Syberia 1 on mid-end handheld (trimui smart pro, OpenGLES3.2 via libretro) and unfortunately I don't any huge performance difference between SW and HW rendering. I agree that the main menu is lagging so hard that it takes a minute to move mouse pointer to "new game".
[INFO] [GL] Vendor: Imagination Technologies, Renderer: PowerVR Rogue GE8300. [INFO] [GL] Version: OpenGL ES 3.2 build 1.19@6345021. [INFO] [GL] Using resolution 1280x720.
There are not many 3d obj changes in the scene, so why does Syberia lag so much?

OSX trace from the Instruments app