Vulkan support
Re: Vulkan support
Thank you pastdue Keep up the good work!
- moltengear
- Trained
- Posts: 170
- Joined: 22 Jul 2017, 15:05
Re: Vulkan support
A new version of Raspberry PI has been released.
Most likely for the new gpu they will release a vulkan api.
https://forums.wz2100.net/viewtopic.php?f=30&t=15172
Compressed texture patterns of models (units, structures) are displayed correctly.
But with compressed landscape textures, textures with an alpha channel are not displayed correctly, unlike version 3.1.5.
For me, this is a mystery.
But even so it was possible to reduce the download time of the beginning of the battle.
And also increase the FPS, which favorably affects the delay in multiplayer on weak machines.
We can use compressed textures only to the models at this stage.
I think it makes no sense to implement the lighting, but just take what Nvidia offers.
hardware lighting is always better than software in terms of speed. Other manufacturers will sometime implement hardware lighting anyway.
Most likely for the new gpu they will release a vulkan api.
https://forums.wz2100.net/viewtopic.php?f=30&t=15172
Compressed texture patterns of models (units, structures) are displayed correctly.
But with compressed landscape textures, textures with an alpha channel are not displayed correctly, unlike version 3.1.5.
For me, this is a mystery.
But even so it was possible to reduce the download time of the beginning of the battle.
And also increase the FPS, which favorably affects the delay in multiplayer on weak machines.
We can use compressed textures only to the models at this stage.
I think it makes no sense to implement the lighting, but just take what Nvidia offers.
hardware lighting is always better than software in terms of speed. Other manufacturers will sometime implement hardware lighting anyway.
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: Vulkan support
Setup the Vulkan sdk and all that on my Ubuntu-mate 19.04 install. Was successfully able to compile your latest branch and tested it a few times. At least the Vulkan backend doesn't get all laggy in fullscreen mode like it did for me with Windows, though maybe that is because I compiled Warzone myself. Runs smooth for both backends.
That upload assert can happen with the OpenGL backend too:
I think it can be triggered by viewing the research in the intelligence screen as well.
That upload assert can happen with the OpenGL backend too:
Code: Select all
info |21:07:52: [upload:242] Attempt to upload to buffer more than once per frame
info |21:07:52: [upload:242] Assert in Warzone: ../lib/ivis_opengl/gfx_api_gl.cpp:242 (lastUploaded_FrameNum != current_FrameNum), last script event: '<none>'
Re: Vulkan support
Interesting. Do you have a git branch for this work?
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: Vulkan support
Request for testers.
The latest Vulkan builds for Windows are here:
New Builds (2020-01-26a)
Full Installer (Windows x86): https://ci.appveyor.com/api/buildjobs/u ... taller.zip
Portable Build (Windows x86): https://ci.appveyor.com/api/buildjobs/u ... rtable.zip
To select your backend, you can use:
- the new "Graphics Backend" option in the Video Options menu
- the command-line option "--gfxbackend=" <opengl, opengles, vulkan, directx>
Graphics backend options on Windows:
- OpenGL
- OpenGL ES*
- Vulkan
- DirectX (via LibANGLE)
* The OpenGL ES option will use your graphics driver's native OpenGL ES support, if available. If not, it may fall back to LibANGLE.
To enable additional 3D-graphics-related logging, use:
warzone2100.exe --debug=3d
(We'll need this extra logging information if you have any issues.)
Some additional notes:
- Adds new "Adaptive Vsync" option (where supported), in addition to Vsync on + off
- Includes "Allow optional per-vertex normals in PIE format"
- Includes numerous fixes for the Vulkan backend, gfx driver compatibility, OpenGL ES, and more
The latest Vulkan builds for Windows are here:
New Builds (2020-01-26a)
Full Installer (Windows x86): https://ci.appveyor.com/api/buildjobs/u ... taller.zip
Portable Build (Windows x86): https://ci.appveyor.com/api/buildjobs/u ... rtable.zip
To select your backend, you can use:
- the new "Graphics Backend" option in the Video Options menu
- the command-line option "--gfxbackend=" <opengl, opengles, vulkan, directx>
Graphics backend options on Windows:
- OpenGL
- OpenGL ES*
- Vulkan
- DirectX (via LibANGLE)
* The OpenGL ES option will use your graphics driver's native OpenGL ES support, if available. If not, it may fall back to LibANGLE.
To enable additional 3D-graphics-related logging, use:
warzone2100.exe --debug=3d
(We'll need this extra logging information if you have any issues.)
Some additional notes:
- Adds new "Adaptive Vsync" option (where supported), in addition to Vsync on + off
- Includes "Allow optional per-vertex normals in PIE format"
- Includes numerous fixes for the Vulkan backend, gfx driver compatibility, OpenGL ES, and more
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: Vulkan support
Looking for anything in particular? Vulkan and OpenGL backends are working fine on my end. Tested with simulating bot battles and entering Beta campaign.
Trying DirectX or OpenGLES (which falls back to libANGLE) gives this error and the graphics are... pixelated to say the least.
Trying DirectX or OpenGLES (which falls back to libANGLE) gives this error and the graphics are... pixelated to say the least.
Code: Select all
error |17:49:53: [sdl_OpenGL_Impl::createGLContext:188] SDL_GL_GetAttribute failed to get value for SDL_GL_DOUBLEBUFFER (OpenGL error: GL_INVALID_ENUM)
error |17:49:53: [sdl_OpenGL_Impl::createGLContext:189] Double buffering is required for this game - if it isn't actually enabled, things will fail!
Re: Vulkan support
Just the usual testing. It should be much more stable than before, but I'd like to make sure the changes didn't break anything unexpected on different graphics drivers.Berserk Cyborg wrote: ↑27 Jan 2020, 23:10 Looking for anything in particular? Vulkan and OpenGL backends are working fine on my end. Tested with simulating bot battles and entering Beta campaign.
Those specific errors are expected in OpenGL ES / DirectX mode (for now), but pixelated graphics are not. Can you provide a screenshot (versus the expected output in OpenGL / Vulkan mode on your system)?Berserk Cyborg wrote: ↑27 Jan 2020, 23:10Trying DirectX or OpenGLES (which falls back to libANGLE) gives this error and the graphics are... pixelated to say the least.
Code: Select all
error |17:49:53: [sdl_OpenGL_Impl::createGLContext:188] SDL_GL_GetAttribute failed to get value for SDL_GL_DOUBLEBUFFER (OpenGL error: GL_INVALID_ENUM) error |17:49:53: [sdl_OpenGL_Impl::createGLContext:189] Double buffering is required for this game - if it isn't actually enabled, things will fail!
EDIT: And also the log output from running with the --debug=3d command-line option?
(Also: what version of Windows, & what GPU / graphics drivers, are you using? The installer currently bundles a slightly older version of LibANGLE, so I may need to bump the vcpkg commit we use to get a newer LibANGLE version.)
- Berserk Cyborg
- Code contributor
- Posts: 938
- Joined: 26 Sep 2016, 19:56
Re: Vulkan support
On second look, it's mostly the frontend backgrounds, structures, and the terrain that look bad on DirectX / OpenGLES. Using the latest feature update for Windows 10 and I have the latest graphics drivers (Vega 8 + Ryzen 3 APU). Might just be a side effect of those errors, though. Anyway, attached logs on every backend + a few screenshots.
Re: Vulkan support
I just wanted to tell you, that I not respond much, but that I am very awere of what you are doing. I hope you get the best out of this game. A graphicupdate would be the best thing now. Keep up the good work, I hope I see some updated models / terrain one time. There is no equal alternative out there for warzone.
Re: Vulkan support
Vulkan support is now officially merged into the latest development builds!
Grab them here: https://github.com/Warzone2100/warzone2 ... ent-builds
Grab them here: https://github.com/Warzone2100/warzone2 ... ent-builds
Re: Vulkan support
any new test builds available?
Re: Vulkan support
The latest development builds now include Vulkan support. See: https://github.com/Warzone2100/warzone2 ... ent-builds
Re: Vulkan support
thanks! edit: download the artifact is not possible.