• Advertisement
Sign in to follow this  

Vulkan Vulkan: how to compile SaschaWillems demos on ubuntu 16.04.10?

This topic is 417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

Did you add `ppa:canonical-x/vulkan` to your apt repositories?

 

Yes. Heres it all:


user@user-Lenovo-IdeaPad-Flex-10:~$ sudo apt-add-repository ppa:canonical-x/vulkan
[sudo] password for user:
 UPDATE 2016-11-19
All packages have been purged, this PPA was meant for packaging testing only and it has served it's purpose.

UPDATE 2016-03-18 -- vulkan loader has dropped it's demos (can't ship prebuilt shaders) and vkcube is broken, but the driver is now fixed and Willems demos work (some might crash though)

-----

This ppa contains bits and pieces needed to test Vulkan BUT ONLY FOR XENIAL (and maybe 14.04 in the future).

:: sudo apt-add-repository ppa:canonical-x/vulkan
:: sudo apt update
:: sudo apt install vulkan-utils mesa-vulkan-drivers

now run 'vulkaninfo'

Shinier demos: https://github.com/SaschaWillems/Vulkan
Clone the repository, then download the binary tarball and extract it in the bin/ directory of the repository, and run binaries from there (chmod first). Some are buggy with the current intel driver on this PPA.

NOTE:
The intel driver needs DRI3, so either enable it via xorg.conf, or remove intel_drv.so and use the modesetting driver instead (will still be hw accelerated).

Have questions? #ubuntu-x on freenode
 More info: https://launchpad.net/~canonical-x/+archive/ubuntu/vulkan
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp8adk234w/secring.gpg' created
gpg: keyring `/tmp/tmp8adk234w/pubring.gpg' created
gpg: requesting key 12CB614C from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp8adk234w/trustdb.gpg: trustdb created
gpg: key 12CB614C: public key "Launchpad PPA for Canonical X.org" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
user@user-Lenovo-IdeaPad-Flex-10:~$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://ppa.launchpad.net/canonical-x/vulkan/ubuntu xenial InRelease
Hit:3 http://gb.archive.ubuntu.com/ubuntu xenial InRelease              
Hit:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease      
Hit:5 http://ppa.launchpad.net/damien-moore/codeblocks-stable/ubuntu xenial InRelease
Hit:6 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease    
Reading package lists... Done                      
Building dependency tree       
Reading state information... Done
All packages are up-to-date.
user@user-Lenovo-IdeaPad-Flex-10:~$ sudo apt install vulkan-utils mesa-vulkan-drivers
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mesa-vulkan-drivers
user@user-Lenovo-IdeaPad-Flex-10:~$

It may not be available at the moment? Or they forgot it :)

 

I'm not even sure if vulkan will run on my laptop, it doesn't under windows, hence why I'm on Ubuntu(pretty cool).

Edited by paulgriffiths

Share this post


Link to post
Share on other sites


> UPDATE 2016-11-19 All packages have been purged, this PPA was meant for packaging testing only and it has served it's purpose.


I think your answer is right there. :^)

It seems you may need to find some other route. Have you tried any of the official pacakages? Ubuntu’s libvulkan-dev, perhaps?

Share this post


Link to post
Share on other sites

 


> UPDATE 2016-11-19 All packages have been purged, this PPA was meant for packaging testing only and it has served it's purpose.


I think your answer is right there. :^)

It seems you may need to find some other route. Have you tried any of the official pacakages? Ubuntu’s libvulkan-dev, perhaps?

 

 

Ill try that. Thanks did not know these officials existed.

How do you install them? Am pretty new to Ubuntu.

Edited by paulgriffiths

Share this post


Link to post
Share on other sites
You can use `apt-get install` or `apt install` as sudo to install packages. Enter `man apt` to read more about your system’s package manager. If you aren’t already, I highly recommend you familiarize yourself with text-based terminals for both Linux and Windows.

Share this post


Link to post
Share on other sites

The same;

 

 sudo  apt-get install  mesa-vulkan-drivers
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mesa-vulkan-drivers

Edited by paulgriffiths

Share this post


Link to post
Share on other sites
In reply to your first edit, you can check whether or not you’re root with `whoami`— also your prompt will end with `#` if you’re root, or `$` as a regular user.

And you seem to be using the old package name again:

$ sudo apt-get install libvulkan-dev

Share this post


Link to post
Share on other sites

In reply to your first edit, you can check whether or not you’re root with `whoami`— also your prompt will end with `#` if you’re root, or `$` as a regular user.

And you seem to be using the old package name again:

$ sudo apt-get install libvulkan-dev

Still the same even with synaptic manager.

 

Thanks for your help. : I'm guessing mesa-vulkan-drivers are not currently available.

Edited by paulgriffiths

Share this post


Link to post
Share on other sites

Drop installing packages. There's no such need and it's pretty much obsolete. Vulkan doesn't install anymore system-wide. Go to LunarG website and download the SDK: https://lunarg.com/vulkan-sdk/ It contains all you need and even more and everything is up-to-date. I usually unpack Vulkan SDK into /opt keeping all updated versions and symlinking the latest one as the "current". Since it's not a system-wide package anymore you will need to tell where the Vulkan headers and libraries are however, the lazy way is just creating symlinks in /usr/include and /usr/lib into the proper directories from the SDK. Also, it's necessary to tell where the layers are by defining VK_LAYER_PATH env variable ( for example in .bashrc ) that points into PATH_TO_SDK/x86_64/etc/explicit_layer.d directory/. I have updated LD_LIBRARY_PATH in order to pick up the right runtime library ( points at PATH_TO_SDK/x86_64/lib ). Basically, everything you need is in the x86_64 directory ( which before used to be installed system-wide ). It may sound complicated but you do it only once and then, with each update of the SDK you just link to the new directory. It keeps environment clean, easy to update and doesn't mess up drivers ( which was the case if one used one of those nvidia-prime drivers in the past ). All instructions are in the SDK/config directory. If you follow them, you won't have a problem with setting Vulkan environment up. Then you may run build scripts to build examples, samples and tools.

Edited by j_uk_dev

Share this post


Link to post
Share on other sites

Drop installing packages. There's no such need and it's pretty much obsolete. Vulkan doesn't install anymore system-wide. Go to LunarG website and download the SDK: https://lunarg.com/vulkan-sdk/ It contains all you need and even more and everything is up-to-date. I usually unpack Vulkan SDK into /opt keeping all updated versions and symlinking the latest one as the "current". Since it's not a system-wide package anymore you will need to tell where the Vulkan headers and libraries are however, the lazy way is just creating symlinks in /usr/include and /usr/lib into the proper directories from the SDK. Also, it's necessary to tell where the layers are by defining VK_LAYER_PATH env variable ( for example in .bashrc ) that points into PATH_TO_SDK/x86_64/etc/explicit_layer.d directory/. I have updated LD_LIBRARY_PATH in order to pick up the right runtime library ( points at PATH_TO_SDK/x86_64/lib ). Basically, everything you need is in the x86_64 directory ( which before used to be installed system-wide ). It may sound complicated but you do it only once and then, with each update of the SDK you just link to the new directory. It keeps environment clean, easy to update and doesn't mess up drivers ( which was the case if one used one of those nvidia-prime drivers in the past ). All instructions are in the SDK/config directory. If you follow them, you won't have a problem with setting Vulkan environment up. Then you may run build scripts to build examples, samples and tools.

 

 

Thanks for the info, but Ill have to buy a new pc, the deferred shadows demo I'm interested in is glsl 4.5  ive only 4.0.

 

I'm presuming the version numbering for vulkan is the same as opengl's glsl?

Edited by paulgriffiths

Share this post


Link to post
Share on other sites

Drop installing packages. There's no such need and it's pretty much obsolete.

 
I don't think that is very good advice unless you're trying to show how you're a 1337 h4XX0rz.  Tested binary packges have obsoleted the need to download and compile all your software from source on modern distros, not the other way around, and for very good reason.
 
You can pull the latest Mesa 13 packages from the xorg-edgers PPA and the latest Vulkan from the graphics-drivers PPA -- these are PPAs maintained by the people who maintain the official binary packages in Ubuntu and those folks work directly with the various upstreams on bugfixes etc..  Since the software is not fully release-QAd, all the usual disclaimers apply about stability but you can be sure they're clean and not malware.

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libvulkan-dev

That should get you a new enough version of Mesa, OpenGL, GLSL, and Vulkan, at the cost of not having gone through full system integration testing and without full release-level support.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Tags

  • Advertisement
  • Popular Now

  • Similar Content

    • By turanszkij
      Hi, right now building my engine in visual studio involves a shader compiling step to build hlsl 5.0 shaders. I have a separate project which only includes shader sources and the compiler is the visual studio integrated fxc compiler. I like this method because on any PC that has visual studio installed, I can just download the solution from GitHub and everything just builds without additional dependencies and using the latest version of the compiler. I also like it because the shaders are included in the solution explorer and easy to browse, and double-click to open (opening files can be really a pain in the ass in visual studio run in admin mode). Also it's nice that VS displays the build output/errors in the output window.
      But now I have the HLSL 6 compiler and want to build hlsl 6 shaders as well (and as I understand I can also compile vulkan compatible shaders with it later). Any idea how to do this nicely? I want only a single project containing shader sources, like it is now, but build them for different targets. I guess adding different building projects would be the way to go that reference the shader source project? But how would they differentiate from shader type of the sources (eg. pixel shader, compute shader,etc.)? Now the shader building project contains for each shader the shader type, how can other building projects reference that?
      Anyone with some experience in this?
    • By mark_braga
      I am working on a compute shader in Vulkan which does some image processing and has 1024 * 5=5120 loop iterations (5 outer and 1024 inner)
      If I do this, I get a device lost error after the succeeding call to queueSubmit after the image processing queueSubmit
      // Image processing dispatch submit(); waitForFence(); // All calls to submit after this will give the device lost error If I lower the number of loops from 1024 to 256 => 5 * 256 = 1280 loop iterations, it works fine. The shader does some pretty heavy arithmetic operations but the number of resources bound is 3 (one SRV, one UAV, and one sampler). The thread group size is x=16 ,y=16,z=1
      So my question - Is there a hardware limit to the number of loop executions/number of instructions per shader?
    • By AxeGuywithanAxe
      I wanted to see how others are currently handling descriptor heap updates and management.
      I've read a few articles and there tends to be three major strategies :
      1 ) You split up descriptor heaps per shader stage ( i.e one for vertex shader , pixel , hull, etc)
      2) You have one descriptor heap for an entire pipeline
      3) You split up descriptor heaps for update each update frequency (i.e EResourceSet_PerInstance , EResourceSet_PerPass , EResourceSet_PerMaterial, etc)
      The benefits of the first two approaches is that it makes it easier to port current code, and descriptor / resource descriptor management and updating tends to be easier to manage, but it seems to be not as efficient.
      The benefits of the third approach seems to be that it's the most efficient because you only manage and update objects when they change.
    • By khawk
      CRYENGINE has released their latest version with support for Vulkan, Substance integration, and more. Learn more from their announcement and check out the highlights below.
      Substance Integration
      CRYENGINE uses Substance internally in their workflow and have released a direct integration.
       
      Vulkan API
      A beta version of the Vulkan renderer to accompany the DX12 implementation. Vulkan is a cross-platform 3D graphics and compute API that enables developers to have high-performance real-time 3D graphics applications with balanced CPU/GPU usage. 

       
      Entity Components
      CRYENGINE has addressed a longstanding issue with game code managing entities within the level. The Entity Component System adds a modular and intuitive method to construct games.
      And More
      View the full release details at the CRYENGINE announcement here.

      View full story
    • By khawk
      The AMD GPU Open website has posted a brief tutorial providing an overview of objects in the Vulkan API. From the article:
      Read more at http://gpuopen.com/understanding-vulkan-objects/.


      View full story
  • Advertisement