Jump to content

Vulkan - new graphics API


Recommended Posts

I play a lot this game, my last pc i install this patch and stop working game. even uninstall and isntall again, nothing works, i buy a new one (for other issues, not for this game xD), and performance improve for new hardware.. i want to try help with this giving my logs or other, but i´m fear stop working again :(  any way to help without have that fear?

my old pc works very well for Microsoft + Linux peromance, was basically the same

now. i can put 20.000 units and works very well. but i like to try. 

Link to comment
Share on other sites

5 hours ago, Lierbex said:

I play a lot this game, my last pc i install this patch and stop working game. even uninstall and isntall again, nothing works, i buy a new one (for other issues, not for this game xD), and performance improve for new hardware.. i want to try help with this giving my logs or other, but i´m fear stop working again :(  any way to help without have that fear?

my old pc works very well for Microsoft + Linux peromance, was basically the same

now. i can put 20.000 units and works very well. but i like to try. 

What did you install exactly?

Link to comment
Share on other sites

Do you use the development version? If not you cannot use vulkan.

You need to have the mod enabled at all time if not the game won't even work.

You can run the game from command line to make sure the mods are loaded properly. 

pyrogenesis.exe -mod=mod -mod=public -mod=0ad-spirv -mod=delenda_est -conf:rendererbackend:vulkan

Link to comment
Share on other sites

  • 1 month later...
6 hours ago, seeh said:

idk if i play a development version at the moment. probably not? so i maybe disable spirv

Do you play the official distribution package? Or do you play anything else? If it is the latter and you want to use vulkan you need the mod. If you're using a release candidate it's integrated.

  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi :) I built the WIP dev version (0ad-git AUR package on Arch Linux) and with rendererbackend = "vulkan" in user.cfg it crashes on start before the menu. So I can't switch back to GL via the GUI, so this looks bad if the same would happen to anyone with the release and certain GPUs

About that: I have an Intel HD 4000 (gen7 ivy bridge) so basically the first Intel with Vulkan support (but incomplete/unofficial!). Right at the frontier in the middle of the minefield. Sorry to not have tried sooner since it's and interesting case: not uncommon GPU and partial vulkan support enabled by default.

There doesn't seem to be an existing ticket. Is that correct? So should I create one and which additional info should I provide? In case there isn't already everything there.
My build has the debug symbols. I can also make a debug build if needed. And run it with GDB. (I forgot how to make GDB spit the relevant info after a crash, or maybe it already does)

 

~ ❯❯❯ 0ad
TIMER| InitVfs: 333.458 us
FILES| Main log written to '/home/MIA_UZANTO/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/MIA_UZANTO/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 5.08008 ms
Sound: AlcInit success, using OpenAL Soft
MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete
FILES| UserReport written to '/home/MIA_UZANTO/.config/0ad/logs/userreport_hwdetect.txt'
TIMER| RunHardwareDetection: 4.37839 ms
FILES| Hardware details written to '/home/MIA_UZANTO/.config/0ad/logs/system_info.txt'
TIMER| write_sys_info: 16.534 ms
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/overlayline.xml"
ERROR: Program 'spirv/overlayline' with required defines not found.
ERROR:   "USE_OBJECTCOLOR": "1"
ERROR: Failed to load shader 'spirv/overlayline'
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/overlayline.xml"
ERROR: Program 'spirv/overlayline' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "USE_OBJECTCOLOR": "1"
ERROR: Failed to load shader 'spirv/overlayline'
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/overlayline.xml"
ERROR: Program 'spirv/overlayline' with required defines not found.
ERROR: Failed to load shader 'spirv/overlayline'
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/foreground_overlay.xml"
ERROR: Program 'spirv/foreground_overlay' with required defines not found.
ERROR: Failed to load shader 'spirv/foreground_overlay'
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/overlay_solid.xml"
ERROR: Program 'spirv/overlay_solid' with required defines not found.
ERROR: Failed to load shader 'spirv/overlay_solid'
TIMER| InitRenderer: 13.8888 ms
TIMER| ps_console: 3.17901 ms
TIMER| ps_lang_hotkeys: 2.51741 ms
TIMER| common/modern/setup.xml: 413.352 us
TIMER| common/modern/styles.xml: 139.937 us
TIMER| common/modern/sprites.xml: 889.833 us
TIMER| common/global.xml: 384.85 us
TIMER| common/setup.xml: 214.359 us
TIMER| common/sprites.xml: 332.596 us
TIMER| common/styles.xml: 101.024 us
TIMER| pregame/backgrounds/: 503.768 us
TIMER| pregame/sprites.xml: 118.376 us
TIMER| pregame/styles.xml: 34.883 us
TIMER| pregame/mainmenu.xml: 30.4513 ms
ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/canvas2d.xml"
ERROR: Program 'spirv/canvas2d' with required defines not found.
ERROR: Failed to load shader 'spirv/canvas2d'
Assertion failed: "0 <= pass && pass < static_cast<int>(m_Passes.size())"
Location: ShaderTechnique.cpp:59 (GetGraphicsPipelineState)

Call stack:

(0x5628a69d3d6f) /usr/bin/pyrogenesis(+0x8a7d6f) [0x5628a69d3d6f]
(0x5628a69832e8) /usr/bin/pyrogenesis(+0x8572e8) [0x5628a69832e8]
(0x5628a6984cd9) /usr/bin/pyrogenesis(+0x858cd9) [0x5628a6984cd9]
(0x5628a6985607) /usr/bin/pyrogenesis(+0x859607) [0x5628a6985607]
(0x5628a66656af) /usr/bin/pyrogenesis(+0x5396af) [0x5628a66656af]
(0x5628a65fc053) /usr/bin/pyrogenesis(+0x4d0053) [0x5628a65fc053]
(0x5628a65fa06a) /usr/bin/pyrogenesis(+0x4ce06a) [0x5628a65fa06a]
(0x5628a696d2b2) /usr/bin/pyrogenesis(+0x8412b2) [0x5628a696d2b2]
(0x5628a68e31d6) /usr/bin/pyrogenesis(+0x7b71d6) [0x5628a68e31d6]
(0x5628a694839c) /usr/bin/pyrogenesis(+0x81c39c) [0x5628a694839c]
(0x5628a68b2282) /usr/bin/pyrogenesis(+0x786282) [0x5628a68b2282]
(0x5628a66aa055) /usr/bin/pyrogenesis(+0x57e055) [0x5628a66aa055]
(0x5628a66aa736) /usr/bin/pyrogenesis(+0x57e736) [0x5628a66aa736]
(0x5628a66ad5ea) /usr/bin/pyrogenesis(+0x5815ea) [0x5628a66ad5ea]
(0x5628a61eab8b) /usr/bin/pyrogenesis(+0xbeb8b) [0x5628a61eab8b]
(0x5628a61ecf55) /usr/bin/pyrogenesis(+0xc0f55) [0x5628a61ecf55]

errno = 2 (Error during IO)
OS error = ?


ShaderTechnique.cpp(59): Assertion failed: "0 <= pass && pass < static_cast<int>(m_Passes.size())"
/usr/include/c++/13.1.1/bits/stl_vector.h:1144: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](size_type) const [with _Tp = CShaderPass; _Alloc = std::allocator<CShaderPass>; const_reference = const CShaderPass&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
/usr/bin/0ad: linio 9ª: 88824 Abortita                (nekropsio elŝutita)"$pyrogenesis" "$@"

 

Edited by tuxayo
Link to comment
Share on other sites

29 minutes ago, tuxayo said:

So I can't switch back to GL via the GUI, so this looks bad if the same would happen to anyone with the release and certain GPUs

I had an unsuccessful try with Vulkan on a27 RC with an incompatible driver and the game automatically switched back the backendrenderer, no GUI necessary. Did your game not do that, or did you not give it the chance to do that?

Link to comment
Share on other sites

> Did your game not do that, or did you not give it the chance to do that?

Is just crashes.

With a clearly incompatible driver it triggers stuff like this:
WARNING: Failed to create a Vulkan window: Installed Vulkan doesn't implement the VK_KHR_surface extension

ERROR: Unable to create device for Vulkan backend, switching to GL.

Like what is happening with the AppImage (it mistakenly doesn't find support with fully compliant GPU): https://github.com/0ad-matters/0ad-appimage/issues/19

 

In this case, the HD 4000 has experimental support enable by default in the official Linux Intel driver (Mesa).
Which output this every time in the terminal:

MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete

But it mostly works. I can run the VKCube demo. Run Veloren (with some glitches but it's too slow anyway) and I can use Proton to run Windows games which uses DXVK to translate Direct3D calls to Vulkan. (I might not be able with the latest Proton&DXVK version which requires Vulkan 1.3 support)

Edited by tuxayo
Link to comment
Share on other sites

20 minutes ago, hyperion said:

0ad-git? Your package script might need to build the spir-v shaders or use the 0ad-spirv mod.

Oh crap, that might then be a packaging issue then. But the build instructions don't mention vulkan/spir/shader https://trac.wildfiregames.com/wiki/BuildInstructions

Here is the packaging script: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=0ad-git

 

Ho, the 0ad-spirv mod made it work! :o So false alert about the HD 4000 experimental support crashing the game. I will try to test with an AMD 7950 (GCN 1.0) so the 1st AMD GPUs with Vulkan support (but also experimental, I'm lucky with my GPUs XD).

So what would be the right way to include the spir-v shaders when building packages? (distros might have bad surprises if they forget this and users are locked out of the game until package fix or config file edit)  And also for the build instruction documentation? In case there is something different.

 

Edited by tuxayo
typos
Link to comment
Share on other sites

9 minutes ago, tuxayo said:

But the build instructions don't mention vulkan/spir/shader https://trac.wildfiregames.com/wiki/BuildInstructions

It's mentioned in the first message of this thread :) The final steps aren't established yet because we're tweaking stuff. But they'll be definitely published. Though I'm not sure about the BuildInstructions page, as it's more about packaging and running.

11 minutes ago, tuxayo said:

Ho, the 0ad-spirv mod made it work! :o So false alert about the HD 4000 experimental support crashing the game. I will try to test with an AMD 7950 (GCN 1.0) so the 1st AMD GPUs with Vulkan support (but also experimental, I'm lucky with my GPUs XD).

Do not forget to enable feedback if possible :)

Link to comment
Share on other sites

20 minutes ago, vladislavbelov said:

It's mentioned in the first message of this thread :) The final steps aren't established yet because we're tweaking stuff. But they'll be definitely published. Though I'm not sure about the BuildInstructions page, as it's more about packaging and running.

Sorry, since we reached RC, I didn't think to check for manual stuff to add for Vulkan support. Ok so for now everyone should just use use the spir-v mod or the zip manually I guess.

 

22 minutes ago, vladislavbelov said:

Do not forget to enable feedback if possible :)

The thing in the main menu right? Not the validation you mention in the 1st post.

Link to comment
Share on other sites

40 minutes ago, tuxayo said:

Sorry

No problem :)

40 minutes ago, tuxayo said:

Ok so for now everyone should just use use the spir-v mod or the zip manually I guess.

Not for RC and releases, spirv is prebuilt there.

41 minutes ago, tuxayo said:

The thing in the main menu right? Not the validation you mention in the 1st post.

Yep.

Link to comment
Share on other sites

On 05/06/2023 at 9:29 PM, vladislavbelov said:

Not for RC and releases, spirv is prebuilt there.

Makes sense, the RC actually had some prepackaging so going blindly with source built dev version isn't equivalent (beside the few more recent patches since the RC). Thanks for clearing that up ^^

Anyway, it also works on my AMD HD 7950 (GCN 1.0) :D
S
o hopefully there shouldn't be a bad surprise coming from the firsts Intel and AMD GPUs that had (experimental/incomplete) Vulkan support. I was worried about that.

Edited by tuxayo
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 20/01/2023 at 12:50 PM, andy5995 said:

An AppImage I made in an Ubuntu Jammy container worked on my Laptop with the Intel video. An AppImage I made in a Focal container did not.

 

There's now two AppImages available for 0.0.27-rc1-27645-alpha , one built on focal and another on jammy. If you tried a previously released AppImage for this version and the Vulkan backend was automatically disabled, try the "jammy" image (note the "jammy" image is less likely to run on older distros).

  • Like 3
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...