Help With AMDGPU
Moderator: Moderators
Help With AMDGPU
Hey, I have the AMDGPU drivers and just compiled from source. I've noticed that this engine seems to require OpenGL 4.1 but the compatibility profile only supports upto 3.0 with these mesa drivers, which is the default? Otherwise the 'base game' shows nothing other than the background image I think.
If I do ForceCoreContext = 1 in springsettings.cfg I now get lots of 'missing extensions', I assume deprecated and thus missing from the core profile. Since I'm on Ubuntu 18.04 so I don't think AMDGPU-PRO is an option for me. As you might expect ignoring the missing extension errors gives something like this:
Does anyone know how I can get this engine running with amdgpu drivers? thank you and sorry in advance if i got anything wrong or if this is the wrong board. I just want to get spring working for me :)
EDIT: oh and I also used 'export MESA_GL_VERSION_OVERRIDE=4.5'
If I do ForceCoreContext = 1 in springsettings.cfg I now get lots of 'missing extensions', I assume deprecated and thus missing from the core profile. Since I'm on Ubuntu 18.04 so I don't think AMDGPU-PRO is an option for me. As you might expect ignoring the missing extension errors gives something like this:
Does anyone know how I can get this engine running with amdgpu drivers? thank you and sorry in advance if i got anything wrong or if this is the wrong board. I just want to get spring working for me :)
EDIT: oh and I also used 'export MESA_GL_VERSION_OVERRIDE=4.5'
Re: Help With AMDGPU
last time i tried the development branch i got the same on windows / with amd gpu, too.
i've created an issue as this question about the current state comes up often: https://springrts.com/mantis/view.php?id=5971
only kloot can answer the question about the state of the migration / whats left IMHO.
in short: gfx code is currently ported to opengl 4.5 core profile but its not done yet.
the "maintenance" branch contains most changes of the devlopment branch excluding the opengl changes.
i've created an issue as this question about the current state comes up often: https://springrts.com/mantis/view.php?id=5971
only kloot can answer the question about the state of the migration / whats left IMHO.
in short: gfx code is currently ported to opengl 4.5 core profile but its not done yet.
the "maintenance" branch contains most changes of the devlopment branch excluding the opengl changes.
Re: Help With AMDGPU
Compile the maintenance branch (also required for multiplayer sync), not develop.
Re: Help With AMDGPU
Here's a small list of deprecated stuff still left in that produces OpenGL debug warnings in the menu, if at all useful:abma wrote:last time i tried the development branch i got the same on windows / with amd gpu, too.
i've created an issue as this question about the current state comes up often: https://springrts.com/mantis/view.php?id=5971
only kloot can answer the question about the state of the migration / whats left IMHO.
in short: gfx code is currently ported to opengl 4.5 core profile but its not done yet.
the "maintenance" branch contains most changes of the devlopment branch excluding the opengl changes.
GlobalRendering.cpp:
1079 glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, lodBias * (absBias > 0.01f));
CFontTexture.cpp:
667 glPushAttrib(GL_TEXTURE_BIT);
681 glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, 1, 1, 0, GL_ALPHA, GL_UNSIGNED_BYTE, nullptr);
682 glPopAttrib();
MatrixState.cpp:
80 void GL::MatrixMode(unsigned int glMode) { glMatrixMode(glMode); }
181 void GL::LoadMatrix(const CMatrix44f& m) { glLoadMatrixf(m); }
that's all I can find right now.
Re: Help With AMDGPU
Update: I almost got a bit of the UI working if anyone's at all interested.
This is with the OpenGL 4.5 'core' profile. There were some small changes to do with font rendering etc. Is this useful or am I wasting time?
This is with the OpenGL 4.5 'core' profile. There were some small changes to do with font rendering etc. Is this useful or am I wasting time?
Re: Help With AMDGPU
its very likely useful. pull requests welcomeptstart wrote: Is this useful or am I wasting time?
Re: Help With AMDGPU
The fork is here if you're interested:abma wrote:its very likely useful. pull requests welcomeptstart wrote: Is this useful or am I wasting time?
https://github.com/pts1667/spring
I'm quite new to github... do I just make the pull request now? I don't think I broke anything (hopefully), but I can't test on a system with 4.5 compat profile so I'm not sure if I broke anything.
Re: Help With AMDGPU
yes! the pull request automatically updates when you add commits to the branch where the pull request was created from.ptstart wrote:I'm quite new to github... do I just make the pull request now? I don't think I broke anything (hopefully), but I can't test on a system with 4.5 compat profile so I'm not sure if I broke anything.
i'm noob wrt opengl, so i can't say much to the changes. very likely kloot / hokomoko / jk will review / comment the changes.
Re: Help With AMDGPU
OK, I sent the PR request. Although with the latest state on the repo there appears to be crashes on startup with sound? So I can't see if I messed something up with git...abma wrote:yes! the pull request automatically updates when you add commits to the branch where the pull request was created from.ptstart wrote:I'm quite new to github... do I just make the pull request now? I don't think I broke anything (hopefully), but I can't test on a system with 4.5 compat profile so I'm not sure if I broke anything.
i'm noob wrt opengl, so i can't say much to the changes. very likely kloot / hokomoko / jk will review / comment the changes.
Re: Help With AMDGPU
can you paste the stacktrace wrt the crash and infolog.txt?ptstart wrote:OK, I sent the PR request. Although with the latest state on the repo there appears to be crashes on startup with sound? So I can't see if I messed something up with git...
i've tested current development branch with your changes and it doesn't crash for me...
Re: Help With AMDGPU
Is this it? Again not 100% sure if it has to do with sound, just guessing. This is the debug build.abma wrote:can you paste the stacktrace wrt the crash and infolog.txt?ptstart wrote:OK, I sent the PR request. Although with the latest state on the repo there appears to be crashes on startup with sound? So I can't see if I messed something up with git...
i've tested current development branch with your changes and it doesn't crash for me...
Code: Select all
[f=-000001] [CrashHandler] Error: <00> .../rts/System/Platform/Linux/CrashHandler.cpp:892 CrashHandler::HaltedStacktrace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, siginfo_t*, ucontext_t*)
[f=-000001] [CrashHandler] Error: [00] 0x7e06d2 /home/tom/Documents/forks/spring/rts/System/Platform/Linux/CrashHandler.cpp:892
[f=-000001] [CrashHandler] Error: <01> .../rts/System/Platform/Linux/CrashHandler.cpp:990 CrashHandler::HandleSignal(int, siginfo_t*, void*)
[f=-000001] [CrashHandler] Error: [01] 0x7e0be2 /home/tom/Documents/forks/spring/rts/System/Platform/Linux/CrashHandler.cpp:990
[f=-000001] [CrashHandler] Error: <02> /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7ff00418f890] __restore_rt
[f=-000001] [CrashHandler] Error: [02] 0x12890 ??:?
[f=-000001] [CrashHandler] Error: <03> /build/glibc-OTsEL5/glibc-2.27/math/../sysdeps/x86/fpu/bits/fenv.h:148 __feraiseexcept_invalid_divbyzero
[f=-000001] [CrashHandler] Error: <03> 0x1204b /build/glibc-OTsEL5/glibc-2.27/math/../sysdeps/x86/fpu/bits/fenv.h:148
[f=-000001] [CrashHandler] Error: <03> /build/glibc-OTsEL5/glibc-2.27/math/../sysdeps/x86/fpu/bits/fenv.h:162 __GI_feraiseexcept
[f=-000001] [CrashHandler] Error: <03> 0x1204b /build/glibc-OTsEL5/glibc-2.27/math/../sysdeps/x86/fpu/bits/fenv.h:162
[f=-000001] [CrashHandler] Error: <03> /build/glibc-OTsEL5/glibc-2.27/math/w_log10f_compat.c:35 __log10f
[f=-000001] [CrashHandler] Error: <03> 0x1204b /build/glibc-OTsEL5/glibc-2.27/math/w_log10f_compat.c:35
[f=-000001] [CrashHandler] Error: <04> /usr/lib/x86_64-linux-gnu/libopenal.so.1(+0x32f73) [0x7ff001dedf73] alcCreateContext
[f=-000001] [CrashHandler] Error: [04] 0x32f73 ??:?
[f=-000001] [CrashHandler] Error: <05> /usr/lib/x86_64-linux-gnu/libopenal.so.1(+0x2e5d2) [0x7ff001de95d2] alcCreateContext
[f=-000001] [CrashHandler] Error: [05] 0x2e5d2 ??:?
[f=-000001] [CrashHandler] Error: <06> /usr/lib/x86_64-linux-gnu/libopenal.so.1(alcRenderSamplesSOFT+0x78) [0x7ff001de1968] alcRenderSamplesSOFT
[f=-000001] [CrashHandler] Error: <06> 0x26968 ??:?
[f=-000001] [CrashHandler] Error: <07> .../rts/System/Sound/OpenAL/Sound.cpp:390 RenderSDLSamples(void*, unsigned char*, int)
[f=-000001] [CrashHandler] Error: <07> 0x84c483 /home/tom/Documents/forks/spring/rts/System/Sound/OpenAL/Sound.cpp:390
[f=-000001] [CrashHandler] Error: <08> /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0(+0x20c85) [0x7ff0043bcc85] ??
[f=-000001] [CrashHandler] Error: [08] 0x20c85 ??:0
[f=-000001] [CrashHandler] Error: <09> /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0(+0x67ccc) [0x7ff004403ccc] SDL_LogCritical
[f=-000001] [CrashHandler] Error: [09] 0x67ccc ??:?
[f=-000001] [CrashHandler] Error: <10> /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0(+0xdbd79) [0x7ff004477d79] SDL_LogCritical
[f=-000001] [CrashHandler] Error: <10> 0xdbd79 ??:?
[f=-000001] [CrashHandler] Error: <11> /build/glibc-OTsEL5/glibc-2.27/nptl/pthread_create.c:463 start_thread
[f=-000001] [CrashHandler] Error: <11> 0x76db /build/glibc-OTsEL5/glibc-2.27/nptl/pthread_create.c:463
[f=-000001] [CrashHandler] Error: <12> /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97 clone
[f=-000001] [CrashHandler] Error: <12> 0x12188f /build/glibc-OTsEL5/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97
[f=-000001] Error: [ExitSpringProcess] errorMsg="Spring has crashed:
Floating point exception (SIGFPE).
EDIT 2: nevermind again, it just got further this time... same SIGFPE error as above
Re: Help With AMDGPU
wrt the SIGFPE:
in debug builds DEBUG_SIGNAL_NANS is automaticly enabled: https://github.com/spring/spring/blob/d ... s.txt#L342
it is used to fix desync errors. as this SIGFPE happens in an external lib very likely it can be ignored / is maybe not fixable in spring.
so, either try to disable Sound or disable DEBUG_SIGNAL_NANS.
in debug builds DEBUG_SIGNAL_NANS is automaticly enabled: https://github.com/spring/spring/blob/d ... s.txt#L342
it is used to fix desync errors. as this SIGFPE happens in an external lib very likely it can be ignored / is maybe not fixable in spring.
so, either try to disable Sound or disable DEBUG_SIGNAL_NANS.