VertexAttribPointer is not implemented on ARB and GLES, but is called when gpuskinning.
This patch is avoiding that to happen the way that if gpuskinning is chosen and glsl is not prefered, gpuskinning is not done.
Details
- Reviewers
Stan vladislavbelov - Commits
- rP24101: Do not use GPUSkinning without glsl [Crash fix]
- Trac Tickets
- #5635
Run game with gpuskinning = "true" in config file and with prefer glsl disabled.
Confirm game is not crashing with this patch.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 13265 Build 26516: Vulcan Build Jenkins Build 26515: Vulcan Build (macOS) Jenkins Build 26514: Vulcan Build (Windows) Jenkins Build 26513: arc lint + arc unit
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/572/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1086/display/redirect
source/renderer/Renderer.cpp | ||
---|---|---|
563 ↗ | (On Diff #10319) | I think it's incorrect to insert it inplace. Since we want to disable GPU skinning at all in that case. Also we don't have to do some work in Model.cpp related to GPU skinning in case it's disabled. |
Successful build - Chance fights ever on the side of the prudent.
builderr-debug-macos.txt ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. builderr-release-macos.txt ../../../source/simulation2/scripting/JSInterface_Simulation.cpp:155:4: warning: suggest braces around initialization of subobject [-Wmissing-braces] CFixedVector2D(-halfSize.X, -halfSize.Y), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1601/display/redirect
source/renderer/RenderingOptions.cpp | ||
---|---|---|
116 | Missing a check I think |
source/renderer/RenderingOptions.cpp | ||
---|---|---|
116 | yeah |
Successful build - Chance fights ever on the side of the prudent.
builderr-release-macos.txt /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1602/display/redirect
source/renderer/RenderingOptions.cpp | ||
---|---|---|
144 | If you want to fix it you need to recompile anyway so... |
source/renderer/RenderingOptions.cpp | ||
---|---|---|
144 | No, I mean, when someone will call m_GPUSkinning = true; SetPreferGLSL(false); SetPreferGLSL(true); it (m_GPUSkinning) won't be restored. |
source/renderer/RenderingOptions.cpp | ||
---|---|---|
144 | You can't set it in the game and the config isn't hotloaded is it ? |
source/renderer/RenderingOptions.cpp | ||
---|---|---|
144 | It doesn't matter. Example: in config you have gpuskinning = true then you toggle "Prefer GLSL". And that disables GPU skinning until the game restart. |
source/renderer/RenderingOptions.cpp | ||
---|---|---|
144 | Ah gotcha. |
so you suggest to add variable to keep track if gpu skinning was disabled or to write custom getter for gpuskinning and disable it silently?
Successful build - Chance fights ever on the side of the prudent.
builderr-release-macos.txt /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1616/display/redirect
The solution isn't the best, because you need to re-read the config (or store somewhere else). But usage of rendering options is bit a of mess anyway, so the patch is good enough for it.