News for hackers. Stuff that matters.
Re:Vulkan 1.1 Released by hit8run on Thursday March 08, 2018 @03:44AM (#16543184)
It’s kind of sad that Apple and the Khronos Group diverted here. Apple pushes Metal and has thus far not shown any interest in supporting Vulkan. It would be nice for the industry to have a stable well maintained common denominator for all platforms.
Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @04:39AM (#16543360)
FOSS people like to single out Apple, when the reality is Apple, Nintendo (Switch main API is NVN), Sony and Microsoft (Vulkan is desktop only).

And game devs don't care because they already have their own middleware.

Re:Vulkan 1.1 Released by vetinari on Thursday March 08, 2018 @06:16AM (#16543674)
FOSS people like to single out Apple, because it is the only company that ships desktop and mobile OSes that ignore Vulkan.

You won't find much FOSS software on Nintendo, Playstation or Xbox, and for the respective middlewares porting to their respective 3d apis is cost of business.

Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @06:47AM (#16543763)
Microsoft ships also desktop and mobile OSes that ignore Vulkan.

Vulkan works only on desktop thanks to the same ICD model as OpenGL, which isn't currently supported on UWP.

Re:Vulkan 1.1 Released by vetinari on Thursday March 08, 2018 @08:44AM (#16544250)
Microsoft doesn't make the GPU drivers and the vendors are free to support any API they want, at least under Win32.

Frankly, nobody cares about UWP and nobody cares about Microsoft mobile OSes. Their usage is lower than deskto BSD.

Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @09:43AM (#16544574)
UWP is the way forward, like it or not.

One day those Windows 7/8.x licenses will expire.

Yesterday's Windows Developer day was once again all about the store, IoT and new AI frameworks.

Surfaces and hybrid laptops are also mobile OSes in a certain way.

Re:Vulkan 1.1 Released by vetinari on Thursday March 08, 2018 @09:59AM (#16544666)
Microsoft, during last 20 years, had many APIs that were the future. They were deprecated slightly later.

The licenses won't expire; the support will stop. UWP is not automatic successor, many apps are on Windows because of Win32 and that nobody wants to rewrite decades worth of code. Kill that and you kill Windows.

Re:Vulkan 1.1 Released by Strom on Thursday March 08, 2018 @05:54PM (#16548453)
> UWP is the way forward, like it or not.

In Microsoft's plans perhaps. I don't know of a single person, offline or online, who uses UWP. I've seen some UWP apps benchmarked by magazines, that's about it.

Re:Vulkan 1.1 Released by pjmlp on Friday March 09, 2018 @02:23AM (#16550274)
Anecdote data.

I also have anecdote data from our customers doing UWP ports.

Re:Vulkan 1.1 Released by floatboth on Thursday March 08, 2018 @06:56AM (#16543795)
Who cares about "main API"? Switch supports Vulkan, even got a certification: https://www.khronos.org/conformance/adopters/conformant-prod...
Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @07:11AM (#16543845)
AAA game developers that actually produce games for the platform.

The PS 3 also had OpenGL ES 1.0 with Cg shaders as secondary API, no one cared.

Re:Vulkan 1.1 Released by R3BiRtH on Thursday March 08, 2018 @11:22PM (#16549772)
OpenGL ES on the PS3 was an extemely bad implementation of an already high level api that would make no sense to use on a platform like the PS3, due to how suboptimal it is in quality, and how it's design (as OGL ES) sucks for abstracting performance in comparison.

Vulkan on the switch isn't a suboptimal implementation at all. It's the same Vulkan implementation provided by Nvidia (this is indicated by Ryan C. Gordon, who ported SDL2 to the switch, and subsequently ported the Vulkan and OpenGL support). That is a first class implementation, in regards to features and support, unlike OpenGL ES for the ps3. Plus, Vulkan as a low level api works best for abstracting performance, even more so with the features it has for abstracting perf out of mobile hardware like the switch has (such as for example, render subpasses).

Re:Vulkan 1.1 Released by loup-vaillant on Thursday March 08, 2018 @06:15AM (#16543664)
I hear there's an automatic translator for Dx12 as well, not just Metal. This should cover the Microsoft consoles, shouldn't it?
Re:Vulkan 1.1 Released by loeg on Thursday March 08, 2018 @01:49AM (#16542795)
Notably, radv is 1.1 conformant on launch day: https://airlied.blogspot.com/2018/03/radv-vulkan-11-coforman...
Re:Vulkan 1.1 Released by vetinari on Thursday March 08, 2018 @06:28AM (#16543709)
RADV (Mesa-developed driver for AMD), ANV (Intel), AMDVLK (AMD-developed driver) and Nvidia are all 1.1 conformant on launch day.
Re:Vulkan 1.1 Released by tracyma on Thursday March 08, 2018 @01:02AM (#16542642)
YCbCr texture support is great. Not sure future Android will make SurfaceTexture compatible with Vulkan.

https://stackoverflow.com/questions/43507536/how-to-connect-...

Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @02:51AM (#16542999)
Vulkan support on Android is pretty thin outside Samsung and Google flagship phones, not even big enough to be worthy being listed on Android Dashboards.
Re:Vulkan 1.1 Released by antoineMoPa on Thursday March 08, 2018 @12:53AM (#16542617)
Could someone tell me shortly what Vulkan brings over opengl? To me it seems that Vulkan is raising up the barrier to entry to Graphics programming by being even more complex than OpenGL but I hope this feeling will disappear as more code samples come out.
Re:Vulkan 1.1 Released by gpm on Thursday March 08, 2018 @01:22AM (#16542700)
My first at all substantial graphics program (a ray traced 3d pong game with reflections, refraction, etc) was in Vulkan, not OpenGL. I don't have the most experience in this area, but I probably have a fairly unique viewpoint on this.

Vulkan is lowering the barrier for entry to graphics programming. It's doing this by not having hidden state. I don't have to remember what is stored where when I'm programming, I can follow the very fine spec as a pretty much step by step guide and get a working program. Practically every operation is simple, and only really cares about the arguments you pass it not some global state. This is very friendly to someone learning how it works.

It is raising the bar for implementing the "get a triangle onto the screen" part of the program, but that's not the hard part and never will be. It's also only raising that bar for crazy people like me who use Vulkan directly. In the future by the time Vulkan really takes over I expect it will lower the bar for that, since there will be nice libraries on top of it which deal with the "allocate everything" step for you (and maybe now, I don't know of any but I haven't searched... AMD has something I think).

Re:Vulkan 1.1 Released by geokon on Thursday March 08, 2018 @03:56AM (#16543219)
Have you done anything with OpenCL? Because what a lot of people describe kinda sounds like OpenCL where there isn't really much global state or a predefined pipeline. On a high level you're just sending kernels to be executed on the GPU and you're free to organize things any way you like
Re:Vulkan 1.1 Released by gpm on Thursday March 08, 2018 @10:13AM (#16544777)
I haven't done anything with OpenCL, it's been on my "find an excuse to use this" list for awhile now.

I think you might be getting a false impression of Vulkan though. All the vertex shader, fragment shader, submit a buffer filled with geometry primitives, set depth clamping and filter triangles based on winding order, etc pipeline is still there, it's just much more explicit about how you are using it. There is also support for compute shaders that are more what I imagine OpenCL to be like. If you're doing traditional polygon rendering that's going to be slow. Even in my ray tracing project (that does most of the rendering in a compute shader), I imagine using OpenCL would have made it a bit of a pain to display the results realtime to the screen so people can actually play.

Re:Vulkan 1.1 Released by geokon on Thursday March 08, 2018 @11:53PM (#16549878)
Thanks for clearing it up for me. So the pipeline is there but it's stateless... that sounds cool and I guess I really need to try it out. Using OGL a bit it definitely has this weird archaic feeling with all its state. I found it kind of fun and I didn't really shoot myself in the foot with it, but it definitely felt like "this is not how we write software now a days" haha
Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @04:40AM (#16543364)
> Vulkan is lowering the barrier for entry to graphics programming. It's doing this by not having hidden state.

This is OpenGL specific, there isn't an hidden state on other 3D APIs.

Re:Vulkan 1.1 Released by rys on Thursday March 08, 2018 @05:08AM (#16543461)
That's not true. Direct3Ds up to and including 11 are the same way.
Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @05:28AM (#16543509)
Not really, COM instances for each 3D concept are created and passed around.

There isn't this thing of binding/copying stuff into global state.

Re:Vulkan 1.1 Released by enqk on Thursday March 08, 2018 @10:32AM (#16544919)
What about this (only one example)

ID3D11DeviceContext::IASetVertexBuffers https://msdn.microsoft.com/en-us/library/windows/desktop/ff4...

It's no different from manipulating the opengl context..

Also google bindless opengl

Re:Vulkan 1.1 Released by mellinoe on Thursday March 08, 2018 @03:22PM (#16547321)
It's very different in practice.

D3D11 contexts are explicit, real objects that you create, manipulate, and pass around. They can be properly and realistically handled in multi-threaded code. OpenGL contexts are opaque and global, and properly handling them in multiple threads is a nightmare. Multiple OpenGL contexts is also very different in functionality from multiple D3D11 device contexts.

Re:Vulkan 1.1 Released by sandov on Thursday March 08, 2018 @10:05AM (#16544712)
Is there another viable free & open source 3D API that I've not heard about?
Re:Vulkan 1.1 Released by slavik81 on Thursday March 08, 2018 @01:40AM (#16542762)
The OpenGL state machine is a giant set of hidden global data structures that you manipulate through opaque API calls. It's not very friendly, IMO. My hope is that with stable low-level APIs available, we can build new high-level APIs on top.

Historically, it's been a slow process to move to a newer graphics API, because you need to wait for all the hardware venders to implement it. Building that high-level API in userland means that basic quality-of-life improvements don't have to wait for hardware vendors to write new drivers.

Re:Vulkan 1.1 Released by pizza234 on Thursday March 08, 2018 @07:53AM (#16544021)
There was an epic post from an NVidia developer:

https://www.gamedev.net/forums/topic/666419-what-are-your-op...

In brief: current APIs are a leaky abstraction, and a disproportionate amount of time is spent in debugging the curious "competition" between applications/libraries and drivers, at least, for relatively complex applications.

Re:Vulkan 1.1 Released by __s on Thursday March 08, 2018 @01:01AM (#16542640)
Searched ELI5 vulkan https://www.reddit.com/r/explainlikeimfive/comments/4651a7/e...

Vulkan offers superior performance potential & avoids concurrency issues in GL. It achieves this by more closely matching its abstraction to GPUs as they are today. It also allows for simpler drivers, which should hopefully make for more consistent results

Re:Vulkan 1.1 Released by lucozade on Thursday March 08, 2018 @02:29AM (#16542930)
Vulkan is much lower level than OpenGL. It gives the user much more control, particularly around memory and thread management, at the expense of the user having to manage those pieces.

It has a much higher barrier to entry and will likely stay that way. What will presumably happen is that higher level APIs will emerge that abstract that complexity away.

Re:Vulkan 1.1 Released by Lorkki on Thursday March 08, 2018 @03:20AM (#16543100)
Vulkan is actually really close in scope to the vendor-specific APIs that OpenGL drivers use to communicate with the GPU. The intention from the beginning was that you would pick an appropriate higher-level abstraction (unless you're, say, making Unreal Engine and already retooled your OpenGL pipeline for the AZDO extensions).

The clear advantage over OpenGL is that those abstractions are debuggable and vendor-independent.

Re:Vulkan 1.1 Released by exDM69 on Thursday March 08, 2018 @05:20AM (#16543489)
OpenGL is a terrible API with 25 years worth of legacy baggage. There are many ways of doing everything and a portable engine needs to support many methods for even the simplest of things because the newest and best methods aren't supported everywhere.

Vulkan is a much better designed API with a lot less legacy crap in it. It's lower level and gives more control to the app/engine developer.

The bad news is that Vulkan is a bit verbose, but this stops being an issue once you move past "hello world" level apps. OpenGL gets really difficult once you start doing complex things.

Re:Vulkan 1.1 Released by megaman22 on Thursday March 08, 2018 @05:37AM (#16543551)
The multiplicity of ways to do everything in OpenGL was always a stumbling block for me in the past; it's been a big driver towards leaning in the direction of DirectX, or Monogame or Unity for cross-platform, in the past.

There still seems to be a lot of fragmentation from the handful of samples I've looked at so far; is there something like a canonical example of "the right way" to do things?

Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @07:14AM (#16543855)
Yeah, first thing you have to do is dynamically collect extensions on program startup.

https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Instanc...

Re:Vulkan 1.1 Released by exDM69 on Thursday March 08, 2018 @08:36AM (#16544209)
That's a bit dishonest way to put it. The situation with extensions has vastly improved w.r.t. OpenGL.

In the link you provided, it only needs to enable the appropriate window system extension. It also prints out some info about other extensions but that is not required.

It's a huge improvement that extensions need to be explicitly requested at init time.

It's massively better than OpenGL, and API extensions can't be completely avoided in a multi-vendor cross-platform API without limiting to lowest common denominator.

Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @09:45AM (#16544593)
It doesn't look much different from OpenGL multiple execution paths for each GPU, and possible workarounds when they aren't available.

Specially given the amount of extensions that have been added since Vulkan was released.

Re:Vulkan 1.1 Released by planteen on Friday March 09, 2018 @08:35AM (#16551593)
OpenGL ES 2.0 and higher cleans a lot of that up. Crufty old calls are removed. You simply include a header and link a library without the need for a complex loader (though there still are extensions).
Re:Vulkan 1.1 Released by zaarn on Thursday March 08, 2018 @03:31AM (#16543149)
Vulkan is largely a successor to OpenGL and it's also a lot lower level. IMO it's primarly targeted at engine developers.

The lower level API also allows you to do things that OpenGL simply wouldn't allow, like driving multiple GPUs for one display output using your own abstractions.

DirectX12 is much in the same spirit (but not equivalent, they're still a lot different internally).

Vulkan will also (probably) bring better crossplatform support from Games since it's equally supported on Windows, Linux, Mac (with a library), Android and the Game Consoles. (There is OpenGL on Android but IIRC it's not quite the same)

Re:Vulkan 1.1 Released by HelloNurse on Thursday March 08, 2018 @04:03AM (#16543245)
In this case "lower level" means less messy, not less abstract, and more verbose, not more complex.

A lot of Of constraining and not very valuable parts of OpenGL were replaced with do-it-yourself, making the API "retreat" from advanced complex solutions to more general and more portable building blocks.

Re:Vulkan 1.1 Released by agumonkey on Thursday March 08, 2018 @03:45AM (#16543192)
from the few that I got: gpu drivers and api lied to each others, it lead to absurdly complex drivers full of bugs and absurdly complex codebase full of paranoid tricks to circle around the weird gpu behavior. Complete waste. Vulkan is a bit like RISC, makes it more "complex" but explicit, so in a way it's simpler.
Re:Vulkan 1.1 Released by dtech on Thursday March 08, 2018 @03:13AM (#16543080)
Is OpenGL vs Vulkan really such a big difference for entry? I would think that most programming first experiences with graphics programming are through an engine or wrapper like Unity or SDL.
Re:Vulkan 1.1 Released by golergka on Thursday March 08, 2018 @07:35AM (#16543951)
It's kind of sad to see graphics APIs finally become significantly better while everybody except for a couple of AAA studios uses third party engines.
Re:Vulkan 1.1 Released by craftyguy on Thursday March 08, 2018 @10:29AM (#16544885)
Those third party engines have to use something. I don't think anyone expects all game developers to write their own engines using the vulkan API..
Re:Vulkan 1.1 Released by pjmlp on Thursday March 08, 2018 @09:59AM (#16544665)
It is not a couple of AAA, it is the majority of games industry, the guys that actually attend GDC and publish console games.
Re:Vulkan 1.1 Released by sandov on Thursday March 08, 2018 @10:12AM (#16544772)
Still really good news for people who want to understand and experiment with graphics on a fundamental level, I guess.