supertuxkart / stk-code

The code base of supertuxkart
Other
4.48k stars 1.05k forks source link

Important - Does not run with Mesa 17.2 #2902

Closed qwertychouskie closed 7 years ago

qwertychouskie commented 7 years ago

Output:

qwerty@qwerty-Inspiron-3520:~/STK/stk-update/stk-code/build$ gdb bin/supertuxkart
GNU gdb (Ubuntu 8.0-0ubuntu3) 8.0
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bin/supertuxkart...done.
(gdb) r
Starting program: /home/qwerty/STK/stk-update/stk-code/build/bin/supertuxkart 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[verbose  ] main: Error messages and other text output will be logged to /home/qwerty/.config/supertuxkart/0.8.2/stdout.log.
[info   ] [FileManager]: Data files will be fetched from: '../data/'
[info   ] [FileManager]: User directory is '/home/qwerty/.config/supertuxkart/0.8.2/'.
[info   ] [FileManager]: Addons files will be stored in '/home/qwerty/.local/share/supertuxkart/addons/'.
[info   ] [FileManager]: Screenshots will be stored in '/home/qwerty/.cache/supertuxkart/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in '/home/qwerty/.local/share/supertuxkart/grandprix/'.
[info   ] [FileManager]: Asset 0 will be loaded from '../data/challenges/'.
[info   ] [FileManager]: Asset 1 will be loaded from '../data/gfx/'.
[info   ] [FileManager]: Asset 2 will be loaded from '../data/grandprix/'.
[info   ] [FileManager]: Asset 3 will be loaded from '../data/gui/'.
[info   ] [FileManager]: Asset 4 will be loaded from '../data/library/'.
[info   ] [FileManager]: Asset 5 will be loaded from '../data/models/'.
[info   ] [FileManager]: Asset 6 will be loaded from '../data/music/'.
[info   ] [FileManager]: Asset 7 will be loaded from '../data/replay/'.
[info   ] [FileManager]: Asset 8 will be loaded from '../data/tracks/'.
[info   ] [FileManager]: Asset 9 will be loaded from '../data/sfx/'.
[info   ] [FileManager]: Asset 10 will be loaded from '../data/shaders/'.
[info   ] [FileManager]: Asset 11 will be loaded from '../data/skins/'.
[info   ] [FileManager]: Asset 12 will be loaded from '../data/textures/'.
[info   ] [FileManager]: Asset 13 will be loaded from '../data/ttf/'.
[info   ] [FileManager]: Asset 14 will be loaded from '../data/po/'.
[verbose  ] translation: Env var LANGUAGE = 'en'.
[verbose  ] translation: Language 'English'.
[warn   ] tinygettext: jbo.po: warning: ignoring, unknown language
[warn   ] tinygettext: no.po: warning: ignoring, unknown language
[warn   ] tinygettext: no_NO.po: warning: ignoring, unknown language
[warn   ] tinygettext: sc.po: warning: ignoring, unknown language
[warn   ] tinygettext: sco.po: warning: ignoring, unknown language
Irrlicht Engine version 1.8.0
Linux 4.12.0-11-generic #12-Ubuntu SMP Fri Aug 11 12:26:42 UTC 2017 x86_64
[warn   ] [IrrDriver Temp Logger]: Level 2: No doublebuffering available.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[warn   ] [IrrDriver Temp Logger]: Level 2: No doublebuffering available.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[warn   ] [IrrDriver Temp Logger]: Level 2: No doublebuffering available.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[verbose  ] irr_driver: An invalid resolution was set in the config file, reverting to saner values

[info   ] IrrDriver: OpenGL version: 4.2
[info   ] IrrDriver: OpenGL vendor: Intel Open Source Technology Center
[info   ] IrrDriver: OpenGL renderer: Mesa DRI Intel(R) Ivybridge Mobile 
[info   ] IrrDriver: OpenGL version string: 4.2 (Core Profile) Mesa 17.2.0-rc4
[info   ] GLDriver: AMD Vertex Shader Layer Present
[info   ] GLDriver: ARB Buffer Storage Present
[info   ] GLDriver: ARB Base Instance Present
[info   ] GLDriver: ARB Draw Indirect Present
[info   ] GLDriver: ARB Compute Shader Present
[info   ] GLDriver: ARB Arrays of Arrays Present
[info   ] GLDriver: ARB Texture Storage Present
[info   ] GLDriver: ARB Texture View Present
[info   ] GLDriver: ARB Image Load Store Present
[info   ] GLDriver: ARB Shader Atomic Counters Present
[info   ] GLDriver: ARB Shader Storage Buffer Object Present
[info   ] GLDriver: ARB Multi Draw Indirect Present
[info   ] GLDriver: EXT Texture Compression S3TC Present
[info   ] GLDriver: ARB Texture Compression RGTC Present
[info   ] GLDriver: ARB Uniform Buffer Object Present
[info   ] GLDriver: ARB Explicit Attrib Location Present
[info   ] GLDriver: EXT Texture Filter Anisotropic Present
[info   ] GLDriver: Geometry Shaders Present
[info   ] GLDriver: ARB Texture Swizzle Present
[info   ] GLDriver: ARB Pixel Buffer Object Present
[warn   ] irr_driver: Created visual is not sRGB-capable. Re-creating device to workaround the issue.
[warn   ] [IrrDriver Temp Logger]: Level 2: No doublebuffering available.

[warn   ] [IrrDriver Temp Logger]: Level 3: Fatal error, could not get visual.

[fatal  ] irr_driver: Couldn't initialise irrlicht device. Quitting.

supertuxkart: /home/qwerty/STK/stk-update/stk-code/src/utils/log.hpp:93: static void Log::fatal(const char*, const char*, ...): Assertion `false' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f68e71fb3aa in __GI_abort () at abort.c:89
#2  0x00007f68e71f1b77 in __assert_fail_base (fmt=<optimized out>, 
    assertion=assertion@entry=0x1011a9217 "false", 
    file=file@entry=0x1011a91e0 "/home/qwerty/STK/stk-update/stk-code/src/utils/log.hpp", line=line@entry=93, 
    function=function@entry=0x1011a9a00 <Log::fatal(char const*, char const*, ...)::__PRETTY_FUNCTION__> "static void Log::fatal(const char*, const char*, ...)") at assert.c:92
#3  0x00007f68e71f1c22 in __GI___assert_fail (assertion=0x1011a9217 "false", 
    file=0x1011a91e0 "/home/qwerty/STK/stk-update/stk-code/src/utils/log.hpp", 
    line=93, 
    function=0x1011a9a00 <Log::fatal(char const*, char const*, ...)::__PRETTY_FUNCTION__> "static void Log::fatal(const char*, const char*, ...)")
    at assert.c:101
#4  0x000000010086a3ac in Log::fatal (component=0x1011d44ec "irr_driver", 
    format=0x1011d4768 "Couldn't initialise irrlicht device. Quitting.\n")
    at /home/qwerty/STK/stk-update/stk-code/src/utils/log.hpp:93
#5  0x0000000100975809 in IrrDriver::initDevice (this=0x1019df030)
    at /home/qwerty/STK/stk-update/stk-code/src/graphics/irr_driver.cpp:595
#6  0x0000000100b9a552 in initRest ()
    at /home/qwerty/STK/stk-update/stk-code/src/main.cpp:1378
#7  0x0000000100b9b261 in main (argc=1, argv=0x7fffffffde28)
---Type <return> to continue, or q <return> to quit---
    at /home/qwerty/STK/stk-update/stk-code/src/main.cpp:1551
(gdb) 
Benau commented 7 years ago

deveee confirmed with my hd4600 in mesa 17.2

nado commented 7 years ago

Couldnt reproduce on Gentoo.

deveee commented 7 years ago

You can remove this line from irr_driver: params.HandleSRGB = true;

@Benau Are you ok to get rid of all glEnable(GL_FRAMEBUFFER_SRGB); and do it in the same way as in GLES renderer? The differences are:

If not, I will do it only for intel on linux as a workaround.

And indeed params.HandleSRGB = true shouldn't be used without a fallback...

Benau commented 7 years ago

If doing this can close your SRGB ticket, than yes.

Also this mean pow 2.2 is useless if doing this? some people in irc complain that

deveee commented 7 years ago

@Benau It generally works in srgb_fb branch. But the problem is that it uses linear textures when advanced lighting is disabled and thus it uses wrong textures when textures compression is enabled. So I'm not sure what to do... Use separate directory for enabled/disabled advanced lighting?

pow 2.2 is useless only when advanced lighting is disabled.

Benau commented 7 years ago

Actually you can override ifs.read((char*)&internal_format, sizeof(int)); yourself, in theory whether a texture is srgb should not affect the compression, (this is true for libtxn)

Or we compress texture ourselves, using libsquash maybe

ghost commented 6 years ago

Intel #Mesa Driver Restores Support For # SuperTuxKart , Adds EGL_KHR_gl_colorspace

Details

The Intel i965 Mesa OpenGL driver has restored support for the SuperTuxKart open-source Tux-themed racing game. Mesa 17.2 had broke SuperTuxKart support by no longer exposing an sRGB-capable frame-buffer and has been a blocker for SuperTuxKart support for months. Fortunately, the support is restored now in Mesa 17.4-devel with Git master as of this morning. Tapani Pälli of Intel made the change to expose sRGB visuals and turns on the EGL_KHR_gl_colorspace extension.

Patch