You can sign up to get a daily email of our articles, see the Mailing List page!

The Khronos Group has launched a unified samples repository for Vulkan learning

Posted by , | Views: 11,877

Today, The Khronos Group announced their newest Vulkan initiative with the Unified Samples Repository. A new place to find what they say are high-quality Vulkan code samples reviewed by their team.

Made in response to user demand, to have an accessible place to learn Vulkan with working samples hopefully this might help increase adoption of the open graphics API. It's a big collaboration between Khronos, AMD, Arm, NVIDIA, Samsung, Sascha Willems and more.

"Khronos believes that anyone can learn how to use Vulkan, and the Working Group is continuously looking at how to improve the experience and availability of resources," said Kris Rose, Developer Relations Manager, The Khronos Group. "Now that we have laid the foundation for the project with a comprehensive set of samples covering best practices, API usage, and performance, we will continue to grow the pool of samples with submissions from members, and hopefully, new external contributors. In the future, we hope to open this up to the public so that Vulkan developers can submit their code samples for review.".

They've said it's open for any Khronos member to contribute code, plus external contributors are also welcome but they will need to speak to Developer Relations at Khronos. All the info can be found in their announcement here, find the samples here on GitHub.

Article taken from GamingOnLinux.com.
26 Likes, Who?
We do often include affiliate links to earn us some pennies. We are currently affiliated with GOG, Humble Store and Paradox Interactive. See more information here.
About the author -
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly came back to check on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly.
See more from me
sub 31 October 2019 at 10:01 pm UTC
I wanted to learn OpenGL and didn't manage for years.
Simply couldn't find the time.
Now, I do have some time that I would like to invest in learning a graphics API,
but OpenGL seems to be quite obsolete by now.
Then again, Vulkan as a first graphics API without prior knowledge of GPU architectures,
sounds a bit too challenging.

What do you think is the best approach?
Thanks for any input!
mirv 31 October 2019 at 11:50 pm UTC
View PC info
  • Supporter
  • Top Supporter
That's an incredibly difficult question to answer.

A couple disclaimers: I learned most of what I know of graphics through hobby coding. So I do not consider myself an expert, more of an enthusiast. I've also never done webgl, or mobile (I'm aware of important differences in theory, but the gap between theory and practice can be pretty large sometimes).

So I started on OpenGL 1.2 way back, and steadily learned more as I went along, and as new versions were released. Wound up with OpenGL 4.6, before scooting across to Vulkan. What I can say in that time, is that a GPU architecture of today is vastly different to what "old-school" OpenGL expected.
That's important, because if you learn OpenGL, I would suggest keeping in mind _modern_ OpenGL. That means initial setup, learning about shaders, 4x4 matrices and how they are used to display data, all that fun stuff. And that's a pretty steep learning curve.
By comparison, Vulkan is much more verbose, but matches better against modern GPU designs, and still needs all the fun stuff.

So my suggestion? Don't try to start off with that steep curve. Work backwards. Find something that already does most of the work for you at a very high layer (open source game engines, simple programs like GLTF mesh viewers, various examples, etc) and then dig down the layers as you find something of interest.

For example, find a program that shows a textured cube, and handles changing camera views, loading shaders, etc etc etc. Then play with swapping the texture around (normally loaded from some file). Try then learn about mip levels. Try compressed textures. Try different formats. Then you can try modifying more code: push a key to swap between two textures (this is a relatively big step actually, you might need help with it). Or modify a shader to do something to the texture (add colour to it, etc).

Another example might be to get a simple triangle rendering. Modify it to render a square instead. Then a cube.

So that kind of approach lets you learn piecemeal, rather than having this daunting mountain to climb before you can even see something on the screen.

...oh and reading. Be prepared for lots, and lots, and lots of reading. And searching, and looking up forums for solutions to problems. Ask lots of questions. And if you learn Vulkan, make sure you know about validation layers. And use them. Always. Also use renderdoc. And be prepared for the odd hardware lockup (though it's less of a problem as the drivers have matured).


Last edited by mirv on 31 October 2019 at 11:52 pm UTC
ShabbyX 1 November 2019 at 4:03 am UTC
subI wanted to learn OpenGL and didn't manage for years.
Simply couldn't find the time.
Now, I do have some time that I would like to invest in learning a graphics API,
but OpenGL seems to be quite obsolete by now.
Then again, Vulkan as a first graphics API without prior knowledge of GPU architectures,
sounds a bit too challenging.

What do you think is the best approach?
Thanks for any input!

I was in a similar situation as you 4 years ago when Vulkan came out. I just read the spec (make sure to get the one without extensions) and I can honestly say most of it is pretty simple. Synchronization is not so hard either, if you know them from operating systems. Vulkan is just verbose, otherwise there is really nothing too complicated there. Sure your first code won't be performant, and probably has subtle bugs, but it's easy to start.

I started with compute, as graphics has much more to configure, and it's pretty simple. Once comfortable with using buffers and images, graphics is not that big a step either.

Note that this was right after Vulkan was released, and there weren't any examples around. I approached it step by step, let's make a device, that was easy, now let's create a buffer, cool, now add a compute shader that increments every index, done and voila, a Vulkan program.


Last edited by ShabbyX on 1 November 2019 at 4:06 am UTC
sub 1 November 2019 at 7:57 am UTC
Thanks very much to both you for the detailed input.
That's much appreciated.

So I guess will start getting some of those demos to run and read the spec.
Yet, I'm not expecting it to be "pretty simple".

Edit: The base spec is currently > 2100 pages of rather dense content. Ewwww.


Last edited by sub on 1 November 2019 at 8:02 am UTC
ShabbyX 1 November 2019 at 2:26 pm UTC
subEdit: The base spec is currently > 2100 pages of rather dense content. Ewwww.

A lot of it is things you don't need to start with Vulkan! Renderpass subpasses, multi gpu, the many image formats etc. Like I said, start from the beginning, learn the basics (how to create a device and query its properties for example, then you will find yourself past 10% of the spec already.
linux_gamer 2 November 2019 at 8:37 am UTC
I took a look at graphical programming around the time Vulkan came out and I realized learning OpenGL didn't make sense at that point: Reviewing some simple programming exampes (eg. colored triangle) felt like 5 examples took 6 totally different approaches, because OpenGL had so many versions, extensions, libraries etc.

When the Vulkan specs were released I was excited but in the first year there was literally no literature other than the specs. (The first educational book pretty much was a copycat job of the specs and felt it didn't help at all)

subI wanted to learn OpenGL and didn't manage for years.
Simply couldn't find the time.
Now, I do have some time that I would like to invest in learning a graphics API,
but OpenGL seems to be quite obsolete by now.
Then again, Vulkan as a first graphics API without prior knowledge of GPU architectures,
sounds a bit too challenging.

What do you think is the best approach?
Thanks for any input!

The best education on Vulkan to me was the youtube series (german)
Youtube
sub 2 November 2019 at 6:39 pm UTC
linux_gamer...
The best education on Vulkan to me was the youtube series (german)
Youtube

That looks promising. Thanks!

Deutsch sollte kein Problem darstellen.
While you're here, please consider supporting GamingOnLinux on Patreon, Liberapay or Paypal. We have no adverts, no paywalls, no timed exclusive articles. Just good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!

You need to Register and Login to comment, submit articles and more.


Or login with...

Livestreams & Videos
Community Livestreams
  • RPM Flow: „Pathway“
  • Date:
See more!
Popular this week
View by Category
Contact
Latest Comments
Latest Forum Posts