Jump to content

Vulkan - new graphics API


Recommended Posts

10 hours ago, hyperion said:

For instance shore waves are rendered in gl without fancy while it requires fancy with vulkan

I think it's not the expected difference.

10 hours ago, hyperion said:

also using vulkan models throw shadows onto themself while in gl only onto other objects.

Could you show an example?

10 hours ago, hyperion said:

Do you have an inkling of what is going on there?

Highly likely it's related to material refactorings. I'll investigate it further.

Link to comment
Share on other sites

11 hours ago, andy5995 said:

@vladislavbelov

 

I rebuilt after adding 'LOGWARNING("%s", SDL_GetError());' and this was the new message in the console:

WARNING: Installed Vulkan doesn't implement the VK_KHR_surface extension
 

That was built in Ubuntu bionic with the available libvulkan-dev package from the bionic repo.

 

Do you have installed mesa-vulkan-drivers package?

Link to comment
Share on other sites

7 hours ago, fabio said:

 

Do you have installed mesa-vulkan-drivers package?

I don't see that package is available for Manjaro. I have vulkan-intel installed on my Laptop, nvidia-dkms on my desktop.

@vladislavbelovI was on my laptop when I gave you those logs yesterday. On my desktop, Vulkan with the 0ad AppImage worked.

 

Laptop:

0000:00:02.0 VGA compatible controller: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] (rev 01) (prog-if 00 [VGA controller])

 

Desktop:

01:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050] (rev a1) (prog-if 00 [VGA controller])

 

The distro on both systems is Manjaro. I didn't have to install anything extra yet.

Same output on both systems when I run:

Quote

$ vulkaninfo | grep VK_KHR_surface
    VK_KHR_surface                         : extension revision 25
    VK_KHR_surface_protected_capabilities  : extension revision 1

 

I ran Refresh 2025_Linux  (Binary will attempt to run in Vulkan), on my Laptop and it worked (images attached)

 

Quote

../mesa-22.3.1/src/intel/isl/isl.c:2235: FINISHME: ../mesa-22.3.1/src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.

For the config, I set the res to 1920x1080 and quality to Ultra.

Screenshot_2023-01-17_10-02-08.png

 

Edited by andy5995
using AppImage on both systems (explicitly state)
Link to comment
Share on other sites

10 minutes ago, vladislavbelov said:

Maybe it's unavailable from AppImage? Is it possible to run vulkaninfo from AppImage envrionment?

On both systems I was running 0ad from an AppImage. On the desktop it worked.

 

@Jammyjamjammanhad a similar problem. His graphics card has an AMD chipset. He was able to use Vulkan with the Refresh2025 program I mentioned. But it didn't work with the 0ad AppImage. He may report here later himself with his details.

Edited by andy5995
Link to comment
Share on other sites

19 minutes ago, andy5995 said:

On both systems I was running 0ad from an AppImage. On the desktop it worked.

Could you run the following test program?

#include <iostream>
 
#include <SDL2/SDL.h>
 
int main()
{
    if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER|SDL_INIT_NOPARACHUTE))
    {
        return -1;
    }
    const int flags = SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_VULKAN;
    SDL_Window* window = SDL_CreateWindow("vk-test", 10, 10, 512, 512, flags);
    if (window)
    {
        std::cout << "success" << std::endl;
        SDL_DestroyWindow(window);
    }
    else
    {
        std::cerr << "fail: " << SDL_GetError() << std::endl;
        return -1;
    }
    return 0;
}

Command to run:

g++ -O2 --std=c++17 vk-test.cpp -o vk-test -lSDL2 -I/usr/include/SDL2 && ./vk-test

 

Link to comment
Share on other sites

I'm using the igpu in a ryzen 4800u cpu. I ran the binary extracted from the appimage (`--appimage-extract`), but vulkan failed to be detected and 0ad fell back to gl.

I also built latest git (48d13b) on my own laptop. Vulkan renderer worked fine in 0ad in this build. (No errors and userreport_hwdetect file showed lots of "VK_" .)

  • Like 1
Link to comment
Share on other sites

@vladislavbelov I made an AppImage in a Manjaro build environment and that ran (on my laptop with the Intel) with Vulkan enabled (Yay!). Maybe the vulkan libraries from Ubuntu bionic aren't playing correctly with the drivers on newer distros? Or the vulkan drivers on Manjaro can't play well with a program (inside the AppImage) linking to different versions of vulkan?

I think the next logical step would be for me to build an AppImage in an Ubuntu Focal, or Jammy (or Debian Bullseye)  environment, and see how that runs on my Manjaro laptop. That would definitively answer the question of whether the vulkan drivers on one system can interact with a binary built with other libs (which in this case are included inside the AppImage). What do you think?

cc @Jammyjamjamman@Stan`

I haven't tried the test yet. Do you still need me to?

Link to comment
Share on other sites

On 15/01/2023 at 11:43 AM, vladislavbelov said:

You might attach errors about a "model_solid_tex" material.

Did notice any difference with OpenGL?

Hello, here are my errors attached when i create buildings (with the last update).

Big performance boost with Vulkan on a GTX 1060 6gb (windows 10, 4k screen). For example a general view of my "campsite" in Opengl oscillates between 35-55 fps, with Vulkan it's more 50-70 fps, nice!

interestinglog.html

  • Like 2
Link to comment
Share on other sites

I wonder if a 0ad youtuber could try posting a short 1 to 2 minute comparison. I am very curious about the potential benefits, but I will need to wait for a mac compatible release candidate. It seems some players report significant performance improvements, and some report none at all.

it seems a lot of potential 0ad players are turned away from 0ad by performance issues, so perhaps this could be a popular video.

@ValihrAnt @leopard @seeh  @Darkcity

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

I'm not a specialist but I also think the performance/lag is also due to how each unit action loads the processor and GPU. For example if I give move order to an army of 200 infantry soldiers, there is a big performance drop (due to the pathinding processing cost I imagine). But if those same soldiers attack a building, the performance is much better...

Link to comment
Share on other sites

24 minutes ago, real_tabasco_sauce said:

I wonder if a 0ad youtuber could try posting a short 1 to 2 minute comparison. I am very curious about the potential benefits, but I will need to wait for a mac compatible release candidate. It seems some players report significant performance improvements, and some report none at all.

it seems a lot of potential 0ad players are turned away from 0ad by performance issues, so perhaps this could be a popular video.

@ValihrAnt @leopard @seeh  @Darkcity

We might not have a macOS Vulkan build for A27 it depends on whether we manage to compile or find binaries for MoltenVK.

13 minutes ago, Leyto said:

I'm not a specialist but I also think the performance/lag is also due to how each unit action loads the processor and GPU. For example if I give move order to an army of 200 infantry soldiers, there is a big performance drop (due to the pathinding processing cost I imagine). But if those same soldiers attack a building, the performance is much better...

Selecting two hundred units is slow. You can try moving them and keeping them selected, and moving them and deselecting them. You'll see it's faster. When selected, we gather a lot of information about all the buttons, things they can build etc, and that's slow.

  • Like 3
Link to comment
Share on other sites

so If I select units and give order to move and deselect the units,
lag will be less right?

 

13 hours ago, Stan` said:

Selecting two hundred units is slow. You can try moving them and keeping them selected, and moving them and deselecting them. You'll see it's faster. When selected, we gather a lot of information about all the buttons, things they can build etc, and that's slow.

 

Edited by leopard
Link to comment
Share on other sites

19 hours ago, real_tabasco_sauce said:

perhaps a good way to control would be to just watch a 4v4 replay using GL and then using vulkan. Not sure if replays would be compatible tho.

 replays are not visible, may be I can play with AI or let AI play and make a video of that it will be funny if I add commentary for that though! so may be I shouldn't add commentary.

Edited by leopard
Link to comment
Share on other sites

On 18/01/2023 at 1:34 AM, Stan&#x60; said:

If you run into cases where vulkan doesn't work with the game yeah running it into the docker could be nice

Oh, I was talking about using a build environment in a docker container to create the AppImage. I don't know anything about running graphical apps from a docker container. I think the image would be pretty huge. It would contain a base OS, plus the deps, plus the game. Also, escalated privileges are needed to run docker (which may not be a problem because escalated privileges are need to install the game). Although... might be worth someone's time to try it sometime and see the results. That would be another forum thread though. Maybe split this into a separate topic@Stan`?

Link to comment
Share on other sites

On 17/01/2023 at 10:39 PM, andy5995 said:

@vladislavbelov I made an AppImage in a Manjaro build environment and that ran (on my laptop with the Intel) with Vulkan enabled (Yay!). Maybe the vulkan libraries from Ubuntu bionic aren't playing correctly with the drivers on newer distros? Or the vulkan drivers on Manjaro can't play well with a program (inside the AppImage) linking to different versions of vulkan?

I think the next logical step would be for me to build an AppImage in an Ubuntu Focal, or Jammy (or Debian Bullseye)  environment, and see how that runs on my Manjaro laptop. That would definitively answer the question of whether the vulkan drivers on one system can interact with a binary built with other libs (which in this case are included inside the AppImage). What do you think?

cc @Jammyjamjamman@Stan`

I haven't tried the test yet. Do you still need me to?

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.

 

I opened a ticket on the AppImage repo and posted a summary. @Stan`@vladislavbelov@Jammyjamjamman

Link to comment
Share on other sites

On 19/01/2023 at 6:15 PM, real_tabasco_sauce said:

perhaps a good way to control would be to just watch a 4v4 replay using GL and then using vulkan. Not sure if replays would be compatible tho.

They would, graphic backends do not affect replays. (The mod you have to install maybe)

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