r/linux • • Feb 16 '16

KHRONOS just released Vulkan

https://www.khronos.org/vulkan/
1.9k Upvotes

322 comments sorted by

View all comments

35

u/[deleted] Feb 16 '16

Can someone tell me the real benefits to Vulkan? People are acting like its a big deal but I also see people saying its only a small improvement some of the time? Things like its much harder to work with, its not worth it to even port from opengl a lot of the time, it won't replace opengl at all, and when there is an improvement it is small.

Also I've always wondered, why do Linux games perform worse compared to Windows? I've assumed opengl was the problem but what else is actually holding back Linux game performance?

57

u/ashleysmithgpu Feb 16 '16

Vulkan gives you much lower level control over the GPU. It's up to developers to take advantage of it. This means there is less code in the way of the hardware so hopefully more stable drivers. A lot of the problems with OpenGL drivers is that it has to guess at what the developer is trying to do.

16

u/chiagod Feb 16 '16

Isn't lower CPU utilization and better multi threading also an advantage of Mantle and Vulkan?

2

u/TeutonJon78 Feb 16 '16

Isn't it technically higher CPU utilization? Part of the point is removing the CPU-GPU bottleneck so more cores can talk to the GPU. I'd think this would raise total CPU usage but lower individual core usage.

11

u/ashleysmithgpu Feb 16 '16

If you limited your application to the same frame in both cases rate then it should be lower CPU utilisation than say OpenGL. Because OpenGL does validation, error checking and multi-buffering all of which you can remove or do better with Vulkan if you write your application correctly.

10

u/themadnun Feb 16 '16

"Removing overhead" is a better way to think about it. Now your CPU can run at 100% instead of 80% + 20% overhead for managing the GPU, kinda thing.

5

u/jarfil Feb 16 '16 edited Dec 02 '23

CENSORED

→ More replies (11)

32

u/GTB3NW Feb 16 '16

I recently got TL;DR for it:

  • API is very much designed for parallel work. That means reduced single core usage which was a massive bottleneck for lots of games.

  • More code is executed on the GPU. Think of it being like OpenCL + OpenGL combined. Vulkan uses SPIR-V which describes actions and then what to do with the results. Basically instructions then shader. I'm not an expert on this myself but you can think of it as calculating physics for a bouncing ball for example and then the shading is computing what it looks like.

This most definitely will replace OpenGL but only once the ecosystem updates. The learning curve will be far greater that's for sure. There will probably be less companies building their own engines in house for a while that's for sure.

9

u/burning_iceman Feb 16 '16

OpenGL will stay around for developers who don't need extra performance or fine grained hardware control but instead prefer ease of use or require compatibility with old hardware.

11

u/[deleted] Feb 16 '16

OpenGL becomes redundant if libraries like SDL can beat openGL's performance using Vulkan.

5

u/GTB3NW Feb 16 '16

Vulkan works on all hardware that supports OpenGL 4.1 / OpenGL ES 3.1. If you're using earlier versions of OpenGL then you're silly. Steam doesn't have stats for opengl but does state what percentage (seems broken this month, there was a 60% jump to a low directx version, almost certainly an error).

Less than 4% of cards support directx 9 or below which should still be OpenGL 3.1 compatible. Frankly if you don't have a GPU or support for 3.1 or higher these are not users you want to support, they are not the market share.

3

u/TeutonJon78 Feb 16 '16

Maybe it works on all those cards, but AMD isn't supporting it in any pre-GCN cards even though some could support it.

2

u/[deleted] Feb 16 '16

[removed] — view removed comment

2

u/TeutonJon78 Feb 16 '16 edited Feb 16 '16

Yeah, it's 7700, 8500, and all the newer R7/R9's.

Not even all the 7000 line will be supported, same as the higher 6000 lines (I have a 6950 that won't get it either :( ).

For linux, I thought I read it would only be AMDGPU supported cards getting it, which would be an even higher bar of support. But don't quote me on that. r600g definitely won't see it.

edit: Here's the official support list: https://community.amd.com/community/gaming/blog/2016/02/16/radeon-gpus-are-ready-for-the-vulkan-graphics-api

Yep, amdgpu only.

1

u/chrisoboe Feb 16 '16

Maybe the mesa drivers will support vulkan sometimes for these cards. Most pre gnc card work really great under the oss driver.

1

u/TeutonJon78 Feb 17 '16

AMD funds and develops most (almost all) of that work. So while it would be nice, it's a long shot. They want you on a newer card.

→ More replies (1)

1

u/adelow Feb 16 '16

On a non-GCN GPU, will Vulkan perform as well as OpenGL?

1

u/GTB3NW Feb 16 '16

I have no idea sorry. I'd assume since it's faster in one it will be faster in all of them. It's also down to the drivers but it's in their best interest to make it performant.

1

u/[deleted] Feb 17 '16

Those devs will use existing game engines like UE4 or Unity3D which both are going to support Vulkan. There really will be no point in deploying OpenGL builds from those platform anymore, even for smaller projects.

11

u/[deleted] Feb 16 '16

It is a low level API that exposes the hardware capabilities, while OpenGL is higher level but you never know which function is implemented by the hardware and will be fast; and which one will be emulated inside the CPU.

10

u/bitwize Feb 16 '16

OpenGL is an abstraction layer for 3D drawing. "Draw this geometry with these textures and these shaders" is about as much as you can manage with it. Vulkan gives you much finer grained control over how the rendering pipeline does its work, providing direct access to command buffers (the exact sequence of draw commands), texture and geometry memory, and giving you a lower-level shader language (SPIR-V, think "LLVM for GPUs") to work with. Compared to OpenGL it's like going from Java to C++. Meaning you probably won't see much benefit -- unless you're good at being explicit about how your rendering pipeline hits memory and perform calculations, in which case you can pull out all the stops and squeeze that much more juice out of any given GPU.

6

u/Linux_Learning Feb 16 '16

What does this mean?

Vulkan is a combined effort by the biggest players of the computer graphics market to produce a single, open-source, cross-platform API to replace DirectX, OpenGL and Mantle in the context of gaming, providing the benefits of all three. It also officially replaces OpenGL ES as the primary graphics API for development on Google Android. With the new API, developers will be able to write graphics-related code once and use the same code in releases for any platform including Windows XP-10, Linux (inc. SteamOS, Ubuntu, etc.), Android and Tizen. The potential is that any platform can provide an implementation for Vulkan.

These are the companies involved in the development of the Vulkan specification: https://i.imgur.com/weu36Zo.jpg

These are the companies with membership to the Khronos group, the consortium funding Vulkan: https://i.imgur.com/7stvrM5.png

There's a lot more to it of course, but this is the basic gist. If you want to read more about Vulkan, check the Phoronix article here: https://www.phoronix.com/scan.php?page=article&item=vulkan-10

This is one of the biggest developments in gaming for a long time. All the benefits you've been hearing about DX12 are now available for Vulkan-enabled games on any platform, including Linux. We turned away from consoles due to their locked-down nature, and now it's time for the PCMR to ascend once more to complete gaming freedom whether you choose Linux or Windows (XP, 7, 8 or 10).

This is the biggest news for the PC gaming right now

If you want to make use of Vulkan right now, the development team of The Talos Principle have released a beta version of their game using a Vulkan renderer: https://steamcommunity.com/app/257510/discussions/0/412447331651559970/

Drivers are available right now as follows:

  • Nvidia on Windows 7-10 [1], Linux, Android

  • AMD on Windows 7-10 [2] (coming with amdgpu driver for Linux)

  • Intel on Linux

  • Imagination Technologies on Linux

  • ARM on Linux

  • Qualcomm on Android

[1] https://developer.nvidia.com/vulkan-driver

[2] https://community.amd.com/community/gaming/blog/2016/02/16/radeon-gpus-are-ready-for-the-vulkan-graphics-api

Source: /u/ant59

→ More replies (3)