Opened 2 hours ago

Last modified 62 minutes ago

#15491 new defect

GRAPHICS: OPENGL: GRIM: Grim Fandango 60 > 12 FPS performance drop in ScummVM 2.9.0pre

Reported by: dwatteau Owned by:
Priority: blocker Component: Graphics
Version: Keywords:
Cc: Game: Grim Fandango

Description

Current Git HEAD on OSX PPC 10.5. Built with GCC 7.5.0 and optimisations turned on.

This PowerBook5,6 has an (old) ATI Radeon 9600 XT card, which used to run Grim Fandango just fine in ScummVM 2.8.0.

But on ScummVM 2.9.0pre, the performance has dropped from a solid 60 FPS to 10-12 FPS.

Doing a git bisect gave me the following "culprit":

commit 635cb6b998ccc66614b5dcbd59eab68797abf1cd
Author: Le Philousophe <lephilousophe@users.noreply.github.com>
Date:   Sat Mar 2 11:57:10 2024 +0100

    GRAPHICS: OPENGL: Upgrade glad headers
    
    This allows to remove a workaround in context creation

 graphics/opengl/context.cpp |  90 +++++-----
 graphics/opengl/glad.h      | 417 +++++++++++++++++++-------------------------
 2 files changed, 219 insertions(+), 288 deletions(-)

which is related to GitHub PR <https://github.com/scummvm/scummvm/pull/5683>.

I can attach the process to OSX's Instruments or OpenGL profiler, if necessary. Feel also free to ping me here or over Discord, if you need some live tests or something

Here's the -d6 output:

Using SDL Video Driver "Quartz"
OpenGL: GL context initialized
OpenGL version: 2.0 ATI-1.5.48
OpenGL vendor: ATI Technologies Inc.
OpenGL renderer: ATI Radeon 9600 XT OpenGL Engine
OpenGL: version 2.0
OpenGL: GLSL version string: 1.20
OpenGL: GLSL version: 120
OpenGL: Max texture size: 2048
OpenGL: NPOT texture support: 1
OpenGL: Shader support: 1
OpenGL: Shader support for engines: 1
OpenGL: Multitexture support: 1
OpenGL: FBO support: 0
OpenGL: Multisample FBO support: 0
OpenGL: Multisample max number: -1
OpenGL: Packed pixels support: 1
OpenGL: Packed depth stencil support: 1
OpenGL: Unpack subimage support: 1
OpenGL: OpenGL ES depth 24 support: 0
OpenGL: Texture edge clamping support: 1
OpenGL: Texture border clamping support: 1
OpenGL: Texture mirror repeat support: 1
OpenGL: Texture max level support: 1
Invalid joystick: 0
creating SurfaceSDL graphics manager
creating OpenGL graphics manager
creating OpenGL graphics manager
Using SDL Audio Driver "coreaudio"
Output sample rate: 44100 Hz
Output buffer size: 1024 samples
Output channels: 2
OpenGL: GL context initialized
OpenGL version: 2.0 ATI-1.5.48
OpenGL vendor: ATI Technologies Inc.
OpenGL renderer: ATI Radeon 9600 XT OpenGL Engine
OpenGL: version 2.0
OpenGL: GLSL version string: 1.20
OpenGL: GLSL version: 120
OpenGL: Max texture size: 2048
OpenGL: NPOT texture support: 1
OpenGL: Shader support: 1
OpenGL: Shader support for engines: 1
OpenGL: Multitexture support: 1
OpenGL: FBO support: 0
OpenGL: Multisample FBO support: 0
OpenGL: Multisample max number: -1
OpenGL: Packed pixels support: 1
OpenGL: Packed depth stencil support: 1
OpenGL: Unpack subimage support: 1
OpenGL: OpenGL ES depth 24 support: 0
OpenGL: Texture edge clamping support: 1
OpenGL: Texture border clamping support: 1
OpenGL: Texture mirror repeat support: 1
OpenGL: Texture max level support: 1
WARNING: Libretro is not supported!

Change History (2)

comment:1 by aquadran, 70 minutes ago

Priority: normalblocker

comment:2 by dwatteau, 62 minutes ago

aquadran says on Discord:

it might be related to missing GL_FRAGMENT_PROGRAM_ARB, used in grim to write to zbuffer
but its needed only for classic opengl
without extension access to zbuffer might be very slow
extension in glad needs to be restored

Note: See TracTickets for help on using tickets.