Jump to content

Latest Git still requests spirv for Vulkan support, the mod is not available


Recommended Posts

I still get errors about 0 A.D. wanting spirv in latest Git, which is strange since I thought every dependency for Vulkan was integrated long ago.

ERROR: CCacheLoader failed to find archived or source file for: "shaders/spirv/canvas2d.xml"
ERROR: Program 'spirv/canvas2d' with required defines not found.
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR: Unable to create device for Vulkan backend, switching to GL.

I can't find spivr in the mod downloader. The spirv mod page says I'm not allowed to access it: Is there another place where the patch can be found?

Edited by MirceaKitsune
Link to comment
Share on other sites

4 hours ago, MirceaKitsune said:

I still get errors about 0 A.D. wanting spirv in latest Git, which is strange since I thought every dependency for Vulkan was integrated long ago

SPIR-V files are binary files. As such they are not present in the git repository.

You can either build them, or download them from the nightly build.

Windows provides a script for this. You can adapt it for linux as well.

  • Thanks 1
Link to comment
Share on other sites

Posted (edited)
9 hours ago, Stan` said:

SPIR-V files are binary files. As such they are not present in the git repository.

You can either build them, or download them from the nightly build.

Windows provides a script for this. You can adapt it for linux as well.

Thanks for clarifying. Why is spirv not built with everything else during the standard build procedure? I am on Linux... does having to adapt it mean it won't work as is, if so what changes would have to be made? Where can I find nightly builds containing it, since looking at the Releases RC page it appears to be empty.

Edit: The latest release is new enough that taking it from there should work for now. I looked in /usr/share/0ad/data/mods/mod/mod.zip and see a shaders/spirv in there, I copied that directory into 0ad/binaries/data/mods/mod/shaders (Git) and it no longer seems to throw any errors so I'm presuming it works. It may however get out of date so being able to build it with everything else seems ideal.

Edited by MirceaKitsune
Link to comment
Share on other sites

34 minutes ago, MirceaKitsune said:

Thanks for clarifying. Why is spirv not built with everything else during the standard build procedure? I am on Linux... does having to adapt it mean it won't work as is, if so what changes would have to be made? Where can I find nightly builds containing it, since looking at the Releases RC page it appears to be empty.

Because it requires extra tools you might not have such as GLSLC and the Vulkan SDK. And the shaders are made available in the release tarballs.

See source/tools/spirv for the python script to build shaders.

See this for the nightly build

https://gitea.wildfiregames.com/0ad/0ad/wiki/NightlyBuild

To build you'll need the rules.json in the nightly build source/tools/spirv 

The commands look a bit like

https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/build/jenkins/pipelines/nightly-build.Jenkinsfile#L139

 You can also svn export the shaders to your folder like this script does https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/system/get-nightly-binaries.bat

  • Thanks 1
Link to comment
Share on other sites

14 hours ago, Stan` said:

Windows provides a script for this. You can adapt it for linux as well.

3 hours ago, Stan` said:

You can also svn export the shaders to your folder like this script does

There is already a dedicated script for Unix, source/tools/spirv/get-nightly-shaders.sh

  • Thanks 1
Link to comment
Share on other sites

Hah: I just finished making my own script for fetching it from latest SVN, which I can confirm works as needed.

# Get the latest version of Spirv from the nightly build SVN
# https://svn.wildfiregames.com/nightly-build/trunk/binaries/data/mods/public/shaders/spirv

path="/home/mircea/Games/0ad/0ad_GIT/"

cd "${path}/binaries/data/mods/mod/shaders"
rm -rf "./spirv"
svn export "https://svn.wildfiregames.com/nightly-build/trunk/binaries/data/mods/public/shaders/spirv"

echo -e '\E[32m* Updated, press any key to continue\E[37m'
read

Looking at source/tools/spirv/get-nightly-shaders.sh it seems to do roughly the same thing written in different words, so I'll probably use that :P

  • Like 2
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...