PDA

View Full Version : Vulkan 1.0 released



Anton
17-02-2016, 08:08 PM
Yesterday Khronos has released the first version of their Vulkan API, initially refferred as "Next Generation OpenGL initiative" (http://www.anandtech.com/show/8363/khronos-announces-next-generation-opengl-initiative).

Here is their website - https://www.khronos.org/vulkan/
And here are some examples in C++ - https://github.com/SaschaWillems/Vulkan

Carver413
17-02-2016, 11:58 PM
anyone working on a free pascal version ?

Anton
18-02-2016, 11:02 AM
I hope so, though I guess it will take a while until header translations appear.
If anyone intends to make Pascal headers, it's worth mentioning that it might be easier to write a parser for their API Registry which is a XML and can be found here - https://github.com/KhronosGroup/Vulkan-Docs/blob/1.0/src/spec/vk.xml (which would parse the xml and render a pascal header file), instead of manually translating the C headers.

BeRo
19-02-2016, 05:12 PM
I'll port the Vulkan headers to pascal on the weekend, because primary for my own usage.

de_jean_7777
19-02-2016, 08:37 PM
I'll port the Vulkan headers to pascal on the weekend, because primary for my own usage.
Awesome. You're the man BeRo!

Unfortunately, all my hardware is a generation before what supports Vulkan. So time to scrape some cash and buy new hardware.

Anton
19-02-2016, 09:11 PM
I'll port the Vulkan headers to pascal on the weekend, because primary for my own usage.
That would be cool, man :)

Earlier today I too tried to make translations. I passed the headers through the GCC preprocessor and then through h2pas. With various hand modifications they succeeded to compile in Free Pascal, but the preprocessor has stripped the comments.
But it turned out that both of my video cards doesn't support Vulkan so I won't be able to test them.. until I get a new one. So this puts end to my attempts for now.

Anyway I have attached the files which I managed to produce, in case they make use for anyone

SilverWarior
20-02-2016, 01:21 PM
Where can I find information about which graphics cards do support Vulkan?

de_jean_7777
20-02-2016, 05:37 PM
Where can I find information about which graphics cards do support Vulkan?

The wikipedia page (https://en.wikipedia.org/wiki/Vulkan_%28API%29) lists what drivers/platforms and what hardware is supported.

SilverWarior
20-02-2016, 07:23 PM
It seems that I do won a graphics card capable of running Vulkan. But in order to do this I need to install beta version of drivers which does not have support for DirectX so they would probably break just about everything else.
Therefore I'm deciding whether I should wait a bit for official drivers to came out by which time a Pascal headers might also be done already. Or should I go and install a secondary OS as dual bot to test this out right away.

Any way during my research about Vulkan I ran into some very interesting information. one of the authors of the original C++ based examples is PGD member Sascha Willems (http://www.pascalgamedevelopment.com/member.php?438-Sascha-Willems)
So BeRo I think it would be very beneficial if you two join forces for making of Pascal based headers for Vulkan.

BeRo
22-02-2016, 02:20 AM
So, my vk.xml-to-Pascal-Unit-Translator is now in progress (which've already over 3k of code lines, since I'm using my own small XML parser as inlined code), which should be done in 1-3 days. I'll put this translator then on GitHub under the zlib license, when it's done and working.

You can generate your own most up-to-date Vulkan headers with this translator then yourself just in a few milliseconds.

Carver413
22-02-2016, 03:12 AM
Can't wait to try it out

IntegerAction
22-02-2016, 10:28 PM
Found this one, it's a good beginning:
https://github.com/MaksymTymkovych/Delphi-Vulkan

BeRo
22-02-2016, 11:39 PM
The current state of my vkxml2pas translator tool including output vulkan.pas: https://github.com/BeRo1985/pasvulkan/tree/master/src

It's so far complete, except the Vulkan library loading part, where I'm working still on it in a vk.xml future-proof compliant way, due to the extensions and so on.

Edit: Now it generates real enums.

BeRo
23-02-2016, 11:58 PM
My vkxml2pas-generated header has the followed load interface now:



function LoadVulkanLibrary(const LibraryName:string=VK_DEFAULT_LIB_NAME):boolean;
function LoadVulkanGlobalCommands:boolean;
function LoadVulkanInstanceCommands(const GetInstanceProcAddr:TvkGetInstanceProcAddr;const Instance:TVkInstance;out InstanceCommands:TVulkanCommands):boolean;
function LoadVulkanDeviceCommands(const GetDeviceProcAddr:TvkGetDeviceProcAddr;const Device:TVkDevice;out DeviceCommands:TVulkanCommands):boolean;


where LoadVulkanLibrary loads only vkGetInstanceProcAddr, and LoadVulkanGlobalCommands loads then the remaining functions with help of vkGetInstanceProcAddr(nil,*) (what the Vulkan spec recommend it also), and what LoadVulkanInstanceCommands and LoadVulkanDeviceCommands does, should be clear, when you've read the Vulkan specs.

And now. i must buy a Vulkan-ready Android device zu legen, i.e. at best the NVidia Shield TV (which've already a Vulkan-ready Stock AndroidTV ROM), so that I can make the vkxml2pas-generated Vulkan header also Android/armv7a ready and so that I can test it also.

And a TVulkan class does exist now also, which do also the for-Android/armv7a-target-needed calling-convention-proxying stuff then, because the specs says:



On Android/ARMv7a, Vulkan functions use the armeabi-v7a-hard calling convention, even if the application's native code is compiled with the armeabi-v7a calling convention.


And a default-global TVulkan instance with the name vk does exist now also, so that you can use for example instead vkCreateInstance also vk.CreateInstance (with automatic calling-convention-proxing then).

Anton
29-02-2016, 06:15 PM
Very good job! :)
It turned out that my GTX 850M supports Vulkan after all, so I'll be able to try it out soon.


Where can I find information about which graphics cards do support Vulkan?
Here is another place where you can check - http://vulkan.gpuinfo.org/listreports.php

BeRo
18-05-2017, 07:20 AM
http://www.phoronix.com/scan.php?page=news_item&px=PasVulkan-Vulkan--Pascal-Bind :)

de_jean_7777
18-05-2017, 08:22 AM
http://www.phoronix.com/scan.php?page=news_item&px=PasVulkan-Vulkan--Pascal-Bind :)

Awesome :)