Fixes a todo in GameSetup.cpp. Currently level 6 of quality is the same as level 5
Details
- Reviewers
vladislavbelov wraitii
Enable the option by setting the quality to 6. Check that it works when it's not supported by the platform (aka doesn't crash) make sure it's the proper way to do it tell me where to put the MAX_TEXTURE_MAX_ANISOTROPY_EXT flag. Needs D3020
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 13535 Build 27450: Vulcan Build Jenkins Build 27449: Vulcan Build (macOS) Jenkins Build 27448: Vulcan Build (Windows) Jenkins Build 27447: arc lint + arc unit
Event Timeline
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/libengine.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(dbghelp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(file_stats.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(vfs_path.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1608/display/redirect
Successful build - Chance fights ever on the side of the prudent.
builderr-debug-macos.txt ../../../source/ps/GameSetup/GameSetup.cpp:161:7: warning: variable 'q_flags' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case 6: ^ ../../../source/ps/GameSetup/GameSetup.cpp:174:23: note: uninitialized use occurs here ogl_tex_set_defaults(q_flags, filter); ^~~~~~~ ../../../source/ps/GameSetup/GameSetup.cpp:123:13: note: initialize the variable 'q_flags' to silence this warning int q_flags; ^ = 0 1 warning generated. builderr-release-macos.txt ../../../source/ps/GameSetup/GameSetup.cpp:161:7: warning: variable 'q_flags' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case 6: ^ ../../../source/ps/GameSetup/GameSetup.cpp:174:23: note: uninitialized use occurs here ogl_tex_set_defaults(q_flags, filter); ^~~~~~~ ../../../source/ps/GameSetup/GameSetup.cpp:123:13: note: initialize the variable 'q_flags' to silence this warning int q_flags; ^ = 0 1 warning generated. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(dbghelp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(file_stats.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(vfs_path.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1793/display/redirect
Successful build - Chance fights ever on the side of the prudent.
builderr-release-gcc6.txt ../../../source/ps/GameSetup/GameSetup.cpp: In function 'void InitGraphics(const CmdLineArgs&, int, const std::vector<CStr8>&)': ../../../source/ps/GameSetup/GameSetup.cpp:174:39: warning: 'q_flags' may be used uninitialized in this function [-Wmaybe-uninitialized] ogl_tex_set_defaults(q_flags, filter); ^ ../../../source/ps/GameSetup/GameSetup.cpp:123:6: note: 'q_flags' was declared here int q_flags; ^~~~~~~
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3445/display/redirect
Successful build - Chance fights ever on the side of the prudent.
builderr-debug-macos.txt ../../../source/ps/GameSetup/GameSetup.cpp:161:7: warning: variable 'q_flags' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case 6: ^ ../../../source/ps/GameSetup/GameSetup.cpp:174:23: note: uninitialized use occurs here ogl_tex_set_defaults(q_flags, filter); ^~~~~~~ ../../../source/ps/GameSetup/GameSetup.cpp:123:13: note: initialize the variable 'q_flags' to silence this warning int q_flags; ^ = 0 1 warning generated. builderr-release-macos.txt ../../../source/ps/GameSetup/GameSetup.cpp:161:7: warning: variable 'q_flags' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized] case 6: ^ ../../../source/ps/GameSetup/GameSetup.cpp:174:23: note: uninitialized use occurs here ogl_tex_set_defaults(q_flags, filter); ^~~~~~~ ../../../source/ps/GameSetup/GameSetup.cpp:123:13: note: initialize the variable 'q_flags' to silence this warning int q_flags; ^ = 0 1 warning generated. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(dbghelp.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(file_stats.o) has no symbols /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(vfs_path.o) has no symbols
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1794/display/redirect
Successful build - Chance fights ever on the side of the prudent.
builderr-release-gcc6.txt ../../../source/ps/GameSetup/GameSetup.cpp: In function 'void InitGraphics(const CmdLineArgs&, int, const std::vector<CStr8>&)': ../../../source/ps/GameSetup/GameSetup.cpp:174:39: warning: 'q_flags' may be used uninitialized in this function [-Wmaybe-uninitialized] ogl_tex_set_defaults(q_flags, filter); ^ ../../../source/ps/GameSetup/GameSetup.cpp:123:6: note: 'q_flags' was declared here int q_flags; ^~~~~~~
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3446/display/redirect
It's funny how apparently innocuous code can be terribly broken.
This doesn't work: it's g_AtlasGameLoop->running (your test never passes), and you need to call ogl_tex_upload before have_anistropy (which is typo-ed lol) or things crash.
I also don't think it's a great default, as trilinear filtering is probably fine enough for 0 A.D. You probably should hook in the general quality settings too, but you probably want D2293 for that.
Build failure - The Moirai have given mortals hearts that can endure.
builderr-debug-gcc6.txt In file included from ../../../source/lib/debug.h:44:0, from ../../../source/lib/precompiled.h:74, from ../../../source/pch/lowlevel/precompiled.h:18: ../../../source/lib/res/graphics/ogl_tex.cpp: In function 'void OglTex_init(OglTex*, __va_list_tag*)': ../../../source/lib/res/graphics/ogl_tex.cpp:433:29: error: 'detect_gl_upload_caps' was not declared in this scope ONCE(detect_gl_upload_caps()); ^ ../../../source/lib/code_generation.h:41:32: note: in definition of macro 'STMT' #define STMT(STMT_code__) do { STMT_code__; } while(false) ^~~~~~~~~~~ ../../../source/lib/res/graphics/ogl_tex.cpp:433:2: note: in expansion of macro 'ONCE' ONCE(detect_gl_upload_caps()); ^ ../../../source/lib/res/graphics/ogl_tex.cpp: At global scope: ../../../source/lib/res/graphics/ogl_tex.cpp:739:13: warning: 'void detect_gl_upload_caps()' defined but not used [-Wunused-function] static void detect_gl_upload_caps() ^~~~~~~~~~~~~~~~~~~~~ make[1]: *** [obj/lowlevel_Debug/ogl_tex.o] Error 1 make: *** [lowlevel] Error 2
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/3456/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2903/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
builderr-debug-macos.txt ../../../source/lib/res/graphics/ogl_tex.cpp:433:7: error: use of undeclared identifier 'detect_gl_upload_caps' ONCE(detect_gl_upload_caps()); ^ 1 error generated. make[1]: *** [obj/lowlevel_Debug/ogl_tex.o] Error 1 make: *** [lowlevel] Error 2
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1804/display/redirect