Jump to content

Vulkan - new graphics API


Recommended Posts

0ad-spirv-0.27.9

ERROR: Program 'spirv/model_water' with required defines not found.
ERROR:   "MODE_SHADOWCAST": "1"
ERROR:   "PASS_SHADOWS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.05"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_SPECULAR": "1"
ERROR: Failed to load shader 'spirv/model_water'

ERROR: Program 'spirv/model_water' with required defines not found.
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.05"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_SPECULAR": "1"
ERROR: Failed to load shader 'spirv/model_water'

ERROR: Program 'spirv/model_water' with required defines not found.
ERROR:   "PASS_REFLECTIONS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.05"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_SPECULAR": "1"
ERROR: Failed to load shader 'spirv/model_water'

ERROR: Program 'spirv/model_common' with required defines not found.
ERROR:   "ALPHABLEND_PASS_OPAQUE": "1"
ERROR:   "IGNORE_LOS": "1"
ERROR:   "PASS_REFLECTIONS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.6375"
ERROR:   "USE_TRANSPARENT": "1"
ERROR: Failed to load shader 'spirv/model_common'

ERROR: Program 'spirv/model_common' with required defines not found.
ERROR:   "ALPHABLEND_PASS_BLEND": "1"
ERROR:   "IGNORE_LOS": "1"
ERROR:   "PASS_REFLECTIONS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.05"
ERROR:   "USE_TRANSPARENT": "1"
ERROR: Failed to load shader 'spirv/model_common'
Link to comment
Share on other sites

Hi @vladislavbelov thank you for your greate work.

I did some quick test with every graphic backend in Sahyadri, complete map visible. The game crashes reproducible when too many units were produced (I used "gift from the gods", it crashes around 400 units). It crashed with all backends.

logs_vk.ziplogs_ogl.ziplogs_arb.zip

I can't reproduce the crash with the release candidate A26.

Link to comment
Share on other sites

1 hour ago, OptimusShepard said:

I did some quick test with every graphic backend in Sahyadri, complete map visible. The game crashes reproducible when too many units were produced (I used "gift from the gods", it crashes around 400 units). It crashed with all backends.

Your logs report out of memory (Vulkan says out of GPU memory). Does the shader or texture quality option changes the behavior? I suppose there is new more expensive art in A27.

Link to comment
Share on other sites

2 hours ago, vladislavbelov said:

Your logs report out of memory (Vulkan says out of GPU memory). Does the shader or texture quality option changes the behavior? I suppose there is new more expensive art in A27.

Texture or shader quality doesn't change anything. My GPU memory usage is at 2GB when it crashes. My graphic card has 12GB VRAM.

My last tests produced some new crashes/ error messages. I hope its my build, not your code that fails here.

logs.zip

Link to comment
Share on other sites

25 minutes ago, OptimusShepard said:

Texture or shader quality doesn't change anything.

Any other option maybe? 

25 minutes ago, OptimusShepard said:

My GPU memory usage is at 2GB when it crashes.

It might mean limitation of 32bit application. Your GL crash says: "JavaScript error: out of memory", which means out of available RAM. Highly likely it's the same reason for Vulkan. Might want to build with --large-address-aware.

Link to comment
Share on other sites

it's getting harder to find missing one :)

0ad-spirv-0.27.10:

ERROR: Program 'spirv/model_solid_tex' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "MODE_SHADOWCAST": "1"
ERROR:   "PASS_SHADOWS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_AO": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.4"
ERROR: Failed to load shader 'spirv/model_solid_tex'

ERROR: Program 'spirv/model_common' with required defines not found.
ERROR:   "ALPHABLEND_PASS_OPAQUE": "1"
ERROR:   "IGNORE_LOS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_AO": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.6375"
ERROR: Failed to load shader 'spirv/model_common'

ERROR: Program 'spirv/model_common' with required defines not found.
ERROR:   "ALPHABLEND_PASS_BLEND": "1"
ERROR:   "IGNORE_LOS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_AO": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.05"
ERROR: Failed to load shader 'spirv/model_common'

ERROR: Program 'spirv/model_solid_tex' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "MODE_SILHOUETTEOCCLUDER": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_AO": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.4"
ERROR: Failed to load shader 'spirv/model_solid_tex'

ERROR: Program 'spirv/model_solid_tex' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "MODE_SILHOUETTEOCCLUDER": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.4"
ERROR: Failed to load shader 'spirv/model_solid_tex'

ERROR: Program 'spirv/model_solid' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "MODE_SILHOUETTEOCCLUDER": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_AO": "1"
ERROR:   "USE_PLAYERCOLOR": "1"
ERROR: Failed to load shader 'spirv/model_solid'

ERROR: Program 'spirv/model_solid_tex' with required defines not found.
ERROR:   "IGNORE_LOS": "1"
ERROR:   "MODE_SHADOWCAST": "1"
ERROR:   "PASS_SHADOWS": "1"
ERROR:   "RENDER_DEBUG_MODE": "RENDER_DEBUG_MODE_NONE"
ERROR:   "SHADOWS_CASCADE_COUNT": "1"
ERROR:   "USE_DESCRIPTOR_INDEXING": "1"
ERROR:   "USE_INSTANCING": "1"
ERROR:   "USE_SHADOW": "1"
ERROR:   "USE_SHADOW_PCF": "1"
ERROR:   "USE_SHADOW_SAMPLER": "1"
ERROR:   "USE_FOG": "1"
ERROR:   "USE_NORMAL_MAP": "1"
ERROR:   "USE_SPECULAR_MAP": "1"
ERROR:   "USE_TRANSPARENT": "1"
ERROR:   "USE_AO": "1"
ERROR:   "USE_PARALLAX": "1"
ERROR:   "REQUIRE_ALPHA_GEQUAL": "0.4"
ERROR: Failed to load shader 'spirv/model_solid_tex'

 

Link to comment
Share on other sites

On Ubuntu bionic, the build fails. These are the packages I'm installing

 

https://github.com/0ad-matters/0ad-appimage/blob/trunk/Dockerfile

 

Quote

PostprocManager.cpp
In file included from ../../../source/renderer/InstancingModelRenderer.cpp:28:
../../../source/ps/containers/StaticVector.h:24:10: fatal error: fmt/core.h: No such file or directory
 #include <fmt/core.h>
          ^~~~~~~~~~~~
compilation terminated.
In file included from ../../../source/renderer/HWLightingModelRenderer.cpp:30:
../../../source/ps/containers/StaticVector.h:24:10: fatal error: fmt/core.h: No such file or directory
 #include <fmt/core.h>
          ^~~~~~~~~~~~
compilation terminated.
graphics.make:438: recipe for target 'obj/graphics_Release/HWLightingModelRenderer.o' failed
make[1]: *** [obj/graphics_Release/HWLightingModelRenderer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
graphics.make:441: recipe for target 'obj/graphics_Release/InstancingModelRenderer.o' failed
make[1]: *** [obj/graphics_Release/InstancingModelRenderer.o] Error 1
Makefile:126: recipe for target 'graphics' failed
make: *** [graphics] Error 2

 

 

 

 

 

 

 

Link to comment
Share on other sites

19 hours ago, vladislavbelov said:

It might mean limitation of 32bit application. Your GL crash says: "JavaScript error: out of memory", which means out of available RAM. Highly likely it's the same reason for Vulkan. Might want to build with --large-address-aware.

That solves it. Thank you.

Seems to Vulkan is a bit faster than OpenGL for me. Sahyadri Vulkan 20fps vs OpenGL 18fps (reproducible.

  • Like 2
Link to comment
Share on other sites

On 13/01/2023 at 8:08 AM, vladislavbelov said:

Not yet.

The first step is to reduce the number of driver dependent bugs and crashes and to have a more predictable performance.

Thanks for your answer. Apart some errors about a "model_solid_tex" material, it works quit well! even when I reach the population limit (with cheat codes :P), nice job. (in 4k with nvidia 1060 gtx 6gb)
Should I report here some logs, or the automatic data upload system is enough for you?

Link to comment
Share on other sites

3 hours ago, Leyto said:

Should I report here some logs

You might attach errors about a "model_solid_tex" material.

3 hours ago, Leyto said:

it works quit well!

Did notice any difference with OpenGL?

3 hours ago, Leyto said:

automatic data upload system is enough for you?

If you enabled Feedback in the main menu then it should be enough.

Link to comment
Share on other sites

On 14/01/2023 at 11:44 AM, andy5995 said:

On Ubuntu bionic, the build fails. These are the packages I'm installing

 

https://github.com/0ad-matters/0ad-appimage/blob/trunk/Dockerfile

Chatting with @Stan`helped me figure out the problem

 

core.h isn't in the bionic libfmt-dev package (though it must have been at some point because I'm using the same build environment as I was using for the a26 appimage)

 

https://packages.ubuntu.com/bionic/amd64/libfmt-dev/filelist

 

It's in the corresponding Debian buster package though

https://packages.debian.org/buster/amd64/libfmt-dev/filelist

Link to comment
Share on other sites

27 minutes ago, andy5995 said:

core.h isn't in the bionic libfmt-dev package (though it must have been at some point because I'm using the same build environment as I was using for the a26 appimage)

version 4.0.0 is to old, guess some commit to 0ad increased the minimum requirement.

Edit: you might want to raise a concern: https://code.wildfiregames.com/rP27329

Edited by hyperion
  • Thanks 1
Link to comment
Share on other sites

I got this from running the AppImage I made. More detailed logs attached.

 

Quote

FILES| Main log written to '/home/andya/.config/0ad/logs/mainlog.html'
FILES| Interesting log written to '/home/andya/.config/0ad/logs/interestinglog.html'
TIMER| CONFIG_Init: 3.40999 ms
Sound: AlcInit success, using OpenAL Soft
ERROR: Unable to create device for Vulkan backend, switching to GL.
FILES| UserReport written to '/home/andya/.config/0ad/logs/userreport_hwdetect.txt'

 

vulkan_andy5995_r27455_appimage.zip

Link to comment
Share on other sites

10 hours ago, vladislavbelov said:

Updated.

Thanks. Went through all skirmish maps and can't find any missing shaders anymore with 0ad-spirv-0.27.11.

 

Also disabled validation to get an estimate an vulkan vs gl performance, it's mostly a tie. Some times one is slightly faster than the other and sometimes the other way around. Tho it feels like not comparing the exact same. For instance shore waves are rendered in gl without fancy while it requires fancy with vulkan, also using vulkan models throw shadows onto themself while in gl only onto other objects. To sum up overall they feel roughly the same performance wise.

 

I also didn't come across other issues on the level as those 3 textures mentioned earlier in this thread. Those are the only issue I consider on the level of RB. Do you have an inkling of what is going on there? I just blindly adjusted props size to 64 from 60 as it's 2^6 and it happens to work for me.

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...