Install vulkan on linux

Содержание
  1. Vulkan
  2. Contents
  3. Installation
  4. Verification
  5. Selecting Vulkan driver
  6. Software Vulkan: lavapipe
  7. Vulkan hardware database
  8. Troubleshooting
  9. Error — vulkan: No DRI3 support
  10. Nvidia — vulkan is not working and can not initialize
  11. No device for the display GPU found. Are the intel-mesa drivers installed?
  12. AMDGPU — ERROR_INITIALIZATION_FAILED after vulkaninfo
  13. Vulkan (Русский)
  14. Contents
  15. Установка
  16. Проверка
  17. Выбор драйвера Vulkan
  18. База данных оборудования Vulkan
  19. Решение проблем
  20. Error — vulkan: No DRI3 support
  21. Nvidia — vulkan is not working and can not initialize
  22. No device for the display GPU found. Are the intel-mesa drivers installed?
  23. Как установить поддержку Vulkan API в Linux?
  24. Установка Vulkan в Linux
  25. Установка на Debian
  26. Установка в Ubuntu и производных
  27. Установка на Fedora
  28. Установка в openSUSE
  29. Установка на Arch Linux и производных
  30. Getting Started with the Vulkan SDK
  31. Version for Linux
  32. Versioning
  33. Terminology
  34. System requirements
  35. Administrator privileges (for older SDKs)
  36. Download and Install Packages for building binaries
  37. Ubuntu distributions (18.04 and 16.04)
  38. Fedora core distributions (25 and newer)
  39. Download the SDK
  40. SDK contents
  41. Install the SDK
  42. Tar file contents
  43. System file locations
  44. Uninstalling the SDK
  45. Set up the runtime environment
  46. Environment variable persistence
  47. Verify the installation
  48. Helper build script
  49. Note about VkConfig
  50. Trace and replay
  51. Enable validation and utility layers
  52. Examine Vulkan sample code
  53. Copying SDK Files to System Directories
  54. Next Steps

Vulkan

Vulkan is a low-overhead, cross-platform 3D graphics and compute API.

Contents

Installation

To run a Vulkan application, you will need to install the vulkan-icd-loader package (and lib32-vulkan-icd-loader if you also want to run 32-bit applications), as well as Vulkan drivers for your graphics card(s). There are several packages providing a vulkan-driver:

Other drivers may be installed manually instead:

For Vulkan application development, install vulkan-headers , and optionally vulkan-validation-layers and vulkan-tools (you can find the vulkaninfo tool in here).

Verification

To see which Vulkan implementations are currently installed on your system, use the following command:

To ensure that Vulkan is working with your hardware, install vulkan-tools and use the vulkaninfo command to pull up relevant information about your system. If you get info about your graphics card, you will know that Vulkan is working.

Selecting Vulkan driver

In some cases, multiple vulkan driver are installed (for example RADV and AMDVLK). As of amdvlk 2021.Q3.4, a new switching logic was implemented which enforces AMDVLK as the default and mandates you either

  • set AMD_VULKAN_ICD=RADV to switch from the AMDVLK default,
  • or globally set DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 to re-enable the ICD loader method below.

When DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1 , you can choose your preferred driver by setting the environment variable VK_ICD_FILENAMES . For example, running Steam with the RADV driver is done by

To avoid crashes with 32-bit games, it is possible to assign the 32-bit variant and the 64-bit variant to the environment variable.

Software Vulkan: lavapipe

You can also install the software Vulkan rasterizer known as lavapipe: vulkan-swrast . There is no 32-bit vulkan-swrast package for now (even in AUR).

Vulkan hardware database

The Vulkan Hardware Database provides user reported GPU/driver combinations. Supplying own information is possible by using vulkan-caps-viewer-wayland AUR or vulkan-caps-viewer-x11 AUR .

Troubleshooting

Error — vulkan: No DRI3 support

If you get the message above and using Intel graphics, you may need to force DRI3 and restart Xorg:

Nvidia — vulkan is not working and can not initialize

Check if you have any other vulkan driver installed, it may prevent Nvidia’s vulkan driver from being detected.

Alternatively set the environment variable VK_ICD_FILENAMES to /usr/share/vulkan/icd.d/nvidia_icd.json .

If you have a dual-graphics system, like NVIDIA Optimus, ensure that your system is using the graphics card that you installed Vulkan drivers for.

The factual accuracy of this article or section is disputed.

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

No device for the display GPU found. Are the intel-mesa drivers installed?

Try to list both the intel_icd and primus_vk_wrapper configurations in VK_ICD_FILENAMES

AMDGPU — ERROR_INITIALIZATION_FAILED after vulkaninfo

If after running vulkaninfo on AMD card from GCN1 or GCN2 family you got error message like:

Then check if you have correctly enable support for this models of graphics cards (AMDGPU#Enable Southern Islands (SI) and Sea Islands (CIK) support).

One of possibility to check if gpu drivers are correctly loaded is lspci -k , after running this command check kernel driver of your gpu. It should be amdgpu .

Some forum threads about this problem: [3] [4]

Источник

Vulkan (Русский)

Vulkan (рус. Вулкан) — кроссплатформенный API для 2D- и 3D-графики, впервые представленный Khronos Group в рамках конференции GDC 2015.

Дополнительная информация доступна на веб-сайте Khronos.

Contents

Установка

Чтобы запустить Vulkan-приложение потребуется установить пакет vulkan-icd-loader (и lib32-vulkan-icd-loader , если планируется запускать 32-битные приложения), а также драйвер Vulkan для видеокарты:

Также возможно установить программную реализацию Vulkan, известную, как lavapipe — vulkan-swrast .

Другие драйверы можно установить вручную:

Для разработки приложений Vulkan установите vulkan-headers и, опционально, vulkan-validation-layers и vulkan-tools (в этом пакете также содержится утилита vulkaninfo ).

Проверка

Чтобы узнать, какие реализации Vulkan в настоящее время установлены в вашей системе, используйте следующую команду::

Выбор драйвера Vulkan

В некоторых случаях устанавливается несколько драйверов Vulkan (например, RADV и AMDVLK). Выбрать необходимый драйвер можно с помощью переменной окружения VK_ICD_FILENAMES . Например, запустить Steam с RADV-драйвером возможно следующей командой:

Чтобы избежать сбоев в 32-битных играх, переменной окружения можно задать 32- и 64-битный вариант значения.

База данных оборудования Vulkan

База данных оборудования Vulkan содержит комбинации графических процессоров и драйверов. Предоставление собственной информации возможно с помощью vulkan-caps-viewer-wayland AUR или vulkan-caps-viewer-x11 AUR .

Решение проблем

Error — vulkan: No DRI3 support

При получении данной ошибки с драйвером Intel graphics может потребоваться принудительный выбор DRI3 и перезапуск Xorg:

Nvidia — vulkan is not working and can not initialize

Проверьте, установлены ли в системе другие драйверы Vulkan, так как они могут предотвратить обнаружение Vulkan-драйвера Nvidia.

В качестве альтернативы задайте переменной окружения VK_ICD_FILENAMES значение /usr/share/vulkan/icd.d/nvidia_icd.json .

No device for the display GPU found. Are the intel-mesa drivers installed?

Попробуйте задать конфигурации intel_icd и primus_vk_wrapper в переменной окружения VK_ICD_FILENAMES :

Источник

Как установить поддержку Vulkan API в Linux?

Vulkan — это кроссплатформенный API для разработки приложений с 3D-графикой. Впервые об этом было объявлено на GDC в 2015 году компанией Khronos Group. Первоначально он был представлен Хроносом как «инициатива OpenGL следующего поколения», но затем название было отброшено, оставив Vulkan в качестве окончательного.

Vulkan основан на Mantle, другом API от компании AMD, код которого был передан Khronos с целью создания открытого стандарта, аналогичного OpenGL, но на низком уровне.

Его главная особенность заключается в том, что он может использовать преимущество количества ядер, присутствующих в основном процессоре ПК, резко увеличивая графическую производительность.

Vulkan призван обеспечить ряд преимуществ по сравнению с другими API, а также перед своим предшественником OpenGL.. Vulkan предлагает меньше накладных расходов, более прямой контроль над графическим процессором и меньшую загрузку процессора. Общая концепция и набор функций Vulkan аналогичен Directx 12, Metal и Mantle.

Читайте также:  Многопользовательский режим rdp windows 10

Установка Vulkan в Linux

Прежде чем приступить к установке, Важно изучить совместимость Vulkan с вашим графическим процессором, поскольку не все модели поддерживаются. Это делается за ваш счет, и вам следует зайти на сайт производителя вашего графического процессора и посмотреть спецификации совместимости.

Также необходимо иметь в нашем дистрибутиве последние стабильные видеодрайверы, где можно использовать как открытые, так и частные контроллеры, это дело вкуса.

Установка на Debian

Для тех, кто является пользователями Debian или любого другого дистрибутива на его основе, Вы должны выполнить одну из следующих команд, чтобы установить Vulkan в вашу систему.

Для тех, кто пользуется AMD GPU:

Теперь для тех из вас, кто пользуется графическим процессором Nvidia:

Установка в Ubuntu и производных

Те, кто являются пользователями Ubuntu, Linux Mint, Elementary OS или любой другой производной Ubuntu. Они могут выполнить установку способом, очень похожим на Debian, только здесь мы будем использовать для этого репозитории.

Во-первых, кем бы они ни были Пользователи AMD GPU должны добавить следующий репозиторий:

Я установил позже:

Теперь для всех Пользователи Nvidia GPU просто добавляют этот репозиторий:

А затем мы устанавливаем с помощью:

Установка на Fedora

Для тех, кто пользуется Fedora, а также производными от нее дистрибутивами. Вы можете установить Vulkan API в своей системе, следуя инструкциям в соответствии с вашим графическим процессором.
Те, у кого есть графические процессоры AMD, должны выполнить следующую команду:

Пользователи с графическими процессорами Nvidia должны запустить в терминале следующее:

А позже, чтобы установить графический API Vulkan, мы собираемся выполнить в терминале следующее:

Установка в openSUSE

В случае тех, кто является пользователями любой версии openSUSE, мы собираемся установить Vulkan API, выполнив в терминале следующее.
Пользователи AMD GPU:

Пользователи графического процессора Nvidia:

Установка на Arch Linux и производных

Наконец, для тех, кто является пользователями Arch Linux, Manjaro Linux, Antergos или любой другой производной от Arch Linux, они смогут установить этот API следующим образом.

В конкретном случае этого дистрибутива Linux вы должны знать, что установка видеодрайверов ваших графических процессоров немного отличается от того, что можно сделать в других дистрибутивах.

Как вы знаете, в случае графических процессоров AMD существуют пакеты Radeon или AMDGPU Pro, поэтому здесь у нас есть несколько вариантов для Vulkan API.

Сначала для тех, у кого есть графические процессоры Intel, они собираются установить следующее:

Теперь для пользователей AMD GPU, но с драйверами Radeon установите следующее:

В другом случае от AMD, но с использованием драйверов AMDGPU Pro, это будет сделано из AUR.

Наконец, чтобы проверить установку, мы выполняем:

Содержание статьи соответствует нашим принципам редакционная этика. Чтобы сообщить об ошибке, нажмите здесь.

Полный путь к статье: Любители Linux » Общие » Программное обеспечение Linux » Как установить поддержку Vulkan API в Linux?

Источник

Getting Started with the Vulkan SDK

Version for Linux

This guide describes the requirements and procedure for installing the Vulkan SDK for Linux. All documentation for the SDK can be found online at vulkan.lunarg.com, as well as SDK issue tracking and any latest information.

The Vulkan API is a low-overhead, explicit, cross-platform graphics API that provides applications with direct control over the GPU, maximizing application performance. For more information on the Vulkan specification and API, refer to Khronos.org. The Vulkan API is a low-overhead, explicit, cross-platform graphics API that provides applications with direct control over the GPU, maximizing application performance. For more information on the Vulkan specification and API, refer to Khronos.org. For tutorial-level information, refer to the Vulkan tutorial at the Vulkan SDK Download Site.

This SDK does NOT include a Vulkan driver. Please contact your GPU hardware vendor for a Vulkan Installable Client Driver (ICD). This SDK will allow you to build Vulkan applications but you will need a Vulkan ICD to execute them.

Versioning

The Vulkan SDK provides the development and runtime components required to build, run, and debug Vulkan applications. This SDK is based on the Khronos Vulkan API header, whose version is reflected in the Vulkan SDK version number (for example, SDK version 1.1.70.0 indicates the SDK uses Vulkan header revision 1.1.70). The SDK also includes certain Vulkan extensions for window system integration and debug extensions.

Note: This version number does not indicate an application cannot be developed for earlier Vulkan versions. As such, a 1.1 SDK can still be used to develop Vulkan 1.0 applications but cannot be used to develop applications for future versions of Vulkan. Furthermore, the presence of a 1.1 SDK does not necessarily indicate a system can actually run Vulkan 1.1. A Vulkan 1.1 driver is required for applications to use most Vulkan 1.1 functionality. For more information on how to query Vulkan versions programmatically, see the 1.1 samples in the SDK.

Terminology

Term Description
ABI Application Binary Interface
GLSL OpenGL Shading Language
ICD Installable Client Driver—A Vulkan-compatible display driver
IHV Independent Hardware Vendor—The creator of an ICD
Layer A library designed to work as a plug-in for the loader. It usually serves to provide validation and debugging functionality to applications
Loader A library which implements the Vulkan API entry points and manages layers, extensions, and drivers. It can be found in the SDK as well as independent hardware vendor driver installs
SPIR‑V Standard Portable Intermediate Representation—A cross-API intermediate language that natively represents parallel compute and graphics programs
Vulkan A low-overhead, explicit graphics API developed by the Khronos Group and member companies
WSI Window System Integration

System requirements

Your Linux development and host systems must meet specific hardware and software requirements to install the Vulkan SDK and create Vulkan applications. You will need a Vulkan ICD to execute Vulkan applications.

The Vulkan SDK is supported on 64-bit Linux systems. This guide provides instructions for the following Linux distributions:

  • Ubuntu 18.04 and 16.04
  • Fedora Core (25 and newer)
  • Arch Linux

LunarG does extensive testing on the Ubuntu distributions and touch testing on the other Linux distributions. Additional Linux distributions may work but have not been verified. If the pre-built binaries don’t run on your system we provide the source and a helper script to build these components (See Helper Build Script. Also, you can search your distribution’s package manager for Vulkan development libraries.

Otherwise you may download and build from publicly available repositories. Everything provided in the SDK is open source. The following list are the core repositories that the SDK is composed of:

You will find instructions to build all of the above in their respective repositories.

Administrator privileges (for older SDKs)

Beginning with SDK version 1.0.13, the SDK installer no longer installs files to system locations that require administrator privileges. Administrator privileges are not required to install the SDK if you are installing version 1.0.13 or later and there are no pre-1.0.13 SDK versions installed on the system.

If you have a version of the SDK on your system that is prior to 1.0.13 and you install version 1.0.13 or later, you will need administrator privileges in order to uninstall the older SDK from your system.

Download and Install Packages for building binaries

Ubuntu distributions (18.04 and 16.04)

Upgrade your system to be current on package updates.

If you want to build and run the samples or clone and build any of the repositories using the vulkansdk script, install the following prerequisite packages:

Minimum CMake 3.10.2 version is required.

Dependencies if you want to build vkconfig:

Fedora core distributions (25 and newer)

Update your system to be current on package updates.

If you want to build and run the samples or clone and build any of the repositories using the vulkansdk script, install the following prerequisite packages:

Minimum CMake 3.10.2 version is required.

If you desire to build VkConfig, you must install several Qt dependencies:

Download the SDK

Download the Vulkan SDK from vulkan.LunarG.com. The SDK download file is named vulkansdk-linux-x86_64-1.1.xx.y.tar.gz . «xx» refers to the «patch level» of the Vulkan API. «y» refers to the Vulkan SDK revision number for an SDK series for the Vulkan API version «1.1.xx».

SDK contents

The Vulkan SDK provides the development and runtime components to create, trace, and replay Vulkan applications. The Vulkan SDK also includes the runtime components to run Vulkan Application Validation and Debug Layers.

Install the SDK

Note: Packaging of the Linux Vulkan SDK has changed from a .run file to a .tar.gz file starting from release version 1.1.77.0 and forward. The run file previously created a VulkanSDK directory and then expanded the SDK into the VulkanSDK/1.1.xx.y directory. The tar file now simply expands the SDK into a directory of the form 1.1.xx.y .

The Vulkan SDK installation process consists of extracting the tar file into a desired directory. This directory can be placed anywhere on your system.

Create a work directory. These instructions assume you want to install the SDK under a folder called vulkan , which can be placed anywhere on your system. In this case, it is your HOME directory.

Extract the SDK package. Assuming you had downloaded the package to $HOME/Downloads :

Tar file contents

The table below describes the filesystem unpacked from the SDK tar file, which appears under the top-level 1.1.xx.y directory created when the SDK was extracted. The top-level SDK directory contains a platform-specific folder; for 64-bit Intel CPU targets, it is named x86_64 .

Directory Description
x86_64/bin Vulkan tools and commands
x86_64/include/vulkan Header files required to compile and link your Vulkan application
x86_64/lib Vulkan loader library and layer runtime libraries
x86_64/etc/vulkan/explicit_layer.d .json manifest files for Vulkan validation layers
config Sample layer settings file, system config instructions
samples Sample code from the Vulkan Samples Kit
source Source files

System file locations

If you have installed a Vulkan driver from a GPU vendor, you may wish to verify there is a .json manifest file for that driver installed in one of the following locations:

Directory Description
/etc/vulkan/icd.d/ or /usr/share/vulkan/icd.d Vulkan driver .json manifest file, which is not modified by the SDK installer.

Refer to the Vulkan Loader guide in the «ICD Discovery on Linux» section for detailed information on ICD and layer library search order and paths for this platform.

Uninstalling the SDK

To uninstall the SDK simply remove your local installation directory. e.g.

Set up the runtime environment

Because you installed the Vulkan SDK in a location of your choice, you need to set environment variables to locate the Vulkan SDK components. These variables are identified in the table below. The VULKAN_SDK environment variable is set to the platform-specific directory in your SDK installation (e.g.

/vulkan/1.1.xx.y/x86_64 ). The rest of the variables are set using paths relative to VULKAN_SDK :

Environment Variable File/Path to Include
PATH $VULKAN_SDK/bin
LD_LIBRARY_PATH $VULKAN_SDK/lib
VK_LAYER_PATH $VULKAN_SDK/etc/vulkan/explicit_layer.d

A setup script is provided in the top-level directory of your SDK installation to help you easily set these environment variables. Use the source command to load that script into your current shell:

Of course, you would replace «xx» and «y» with the actual SDK version numbers.

Alternatively you can setup your paths by setting these environment variables yourself:

Environment variable persistence

Note that sourcing the setup-env.sh script or running export commands only set the environment variables for your current shell session. They do not permanently «setup» any of this configuration for other shell sessions or future logins.

If you desire these variables to be setup for you for future sessions, consult your shell or desktop graphical environment documentation for instructions on how to configure your system to define these environment variables for you.

For example, on most Ubuntu desktop systems, adding a line to your .profile file to source the setup-env.sh file sets up the environment variables for you for both shells and programs started from the graphical environment in a desktop session. This should make the environment variables available to desktop tools such as cmake-gui, Qt Creator, or Android Studio.

Verify the installation

Verify the installation of the Vulkan SDK by running a few things:

  1. Run a demo Vulkan application such as Vulkan Info. (See the vulkaninfo page for more information)
  2. Run LunarG’s Vulkan Installation Analyzer (VIA) to determine if it believes everything can execute properly.
    • The VIA executable vkvia does not come prebuilt in the Linux SDK. See Helper Build Script for information on the vulkansdk script.
    • See the VIA page for more information.

Helper build script

The root SDK directory contains a script named vulkansdk to aid with building binaries. There may be some rare instances when the pre-built binaries provided in the Linux SDK will not work with your system. This script will build all the binaries included in the SDK. Be sure you have the necessary requirements (see Download and Install Packages for building binaries) before running this script.

After successfully running vulkansdk the files will be located under the «x86_64» directory. If you ran source setup-env.sh to set up your environment variables the binaries will be in your path (see Set up the Runtime Environment.

The vulkansdk script helps with building the following repositories: glslang, Vulkan loader, Vulkan Validation Layers, Vulkan tools, LunarG’s tools, shaderc, spirv-tools, spirv-cross, and the vulkan layer factory.

Each option will build a corresponding repository. Depending on the repository multiple tools will be built. Here is a list of tools corresponding to the repository that will be built:

Any or all of these script’s options can be used separated by spaces. Run ./vulkansdk help for available options.

Repository vulkansdk script option Resulting Build Components
Khrono’s Vulkan-Loader vulkan-loader libvulkan
Khrono’s Vulkan-ValidationLayers vulkan-validationlayers Khronos Vulkan Validation Layers
Khrono’s Vulkan-Tools vulkan-tools vulkaninfo, vkcube, vkcubepp
LunarG’s VulkanTools lunarg-tools vktrace/vkreplay and layers, VIA, vkconfig
Google’s shaderc shaderc glslc and shaderc libraries
Khorno’s glslang glslang glslangValidator and glslang libraries
Khrono’s SPIRV-Tools spirv-tools SPIRV tools binaries and libraries
Khrono’s SPIRV-Cross spirv-cross SPIRV Cross binary and libraries
LunarG’s Vulkan Layer Factory vlf Builds the Vulkan Layer Factory in the $VULKAN_SDK/source/layer_factory folder
LunarG’s VulkanSamples samples Vulkan Samples Kit
All Repositories all Builds All Repositories

Note about VkConfig

As part of the ./vulkansdk lunarg-tools build process, it will build the vkconfig tool. Vkconfig has additional requirements beyond the rest of the source in this repository, but there is no requirement to build the tool. Because of that, if one or more of those dependencies is not properly installed, you may get a warning during CMake generation like the following:

Please note that not building VkConfig is purely fine as well and will not impact the generation of any other targets.

Trace and replay

The Vulkan SDK supports tracing and replaying Vulkan applications.

Refer to the Vulkan Trace and Replay Tools guide for detailed information on Vulkan trace and replay.

Before proceeding with the next steps, be sure you have sourced the setup-env.sh script, which will enable you to use the trace tools in the SDK bin directory.

Change your current directory to the x86_64/bin .

Create a trace file for the Vulkan Cube program:

The program will close on it’s own after a few seconds. Do not stop the program by using ctrl+c as doing so may result in a corrupted trace file. Notice the trace options used in the command above.

-p, —Program : Name of the program to trace
-o, —OutputTrace : Path/name of the generated trace file
-a, —Arguments : Arguments to pass to the program

In this case we passed the —c 250 argument to Vulkan Cube, which tells it to exit after 250 frames

The generated trace file, vkcube_trace.vktrace , is written to the current directory.

Replay the vkcube trace file you just generated.

Notice the options used in the vkreplay command above.

-o, —Open : Name of trace file to replay; [required]
-l, —NumLoops : Number of times to replay the trace

The -l 2 option replays the trace twice.

Enable validation and utility layers

The Vulkan SDK includes runtime support for validation and utility layers. These layers can be explicitly enabled for an application run or trace replay by setting the VK_INSTANCE_LAYERS environment variable to a colon-separated list of layer or extension names as found in the layer manifest files. Refer to the Vulkan Validation and Utility Layers document for more information on layer manifest files.

The Vulkan SDK includes the following layers:

Layer Name Layer Type Description
VK_LAYER_LUNARG_api_dump utility print API calls and their parameters and values
VK_LAYER_KHRONOS_validation validation Main Vulkan validation layer: validates parameter correctness, Vulkan object lifetimes, externally synchronized thread safety, and the core state-tracked Vulkan validation checks
VK_LAYER_LUNARG_device_simulation utility allows modification of an actual device’s reported features, limits, and capabilities
VK_LAYER_LUNARG_monitor utility outputs the frames-per-second of the target application in the applications title bar
VK_LAYER_LUNARG_screenshot utility outputs specified frames to an image file as they are presented

Refer to the Vulkan Validation and Utility Layers document for detailed information.

The layers can be enabled either by using the graphical tool, Vulkan Configurator, or by setting environment variables. As an example, this section will show how to enable the API dump layer with Vulkan Configurator. The API dump layer will allow you to examine the Vulkan API calls from an application. More information on Vulkan Configurator can be found here.

Execute vkconfig & from the x86_64/bin directory (the ampersand will execute vkconfig in the background).

Select the «Layer Manager» tab at the top.

Check the «Use custom layer paths» box on the top left. Then click the «Search» button and navigate to the SDK in the popup window. Select the SDK’s directory. A popup will ask you to confirm the layers that were found by the SDK. Click ok on this popup.

Find the pane labeled «Unset Explicit Layers». One of the layers in that pane should read «LunarG: Api Dump». Select this layer by clicking on it.

Click the left arrow directly to the left of the «Unset Explicit Layers» pane. The API dump layer should now move to the «Enabled Layers» pane.

Click the «Save» button at the bottom left of the window, and do not exit the Vulkan Configurator.

Run the Vulkan Cube program from a console:

Deactivate the layers you just enabled from Vulkan Configurator by clicking the «Clear» button at the bottom of the window.

The API dump layer output should appear on the screen as the application runs, showing the API calls and parameter values.

Examine Vulkan sample code

The Vulkan SDK includes the Vulkan Samples Kit. This set of Vulkan code Samples is a work in progress. Refer to the Vulkan Samples Kit guide for information about building and running the sample programs.

Copying SDK Files to System Directories

The binaries included in the SDK are all built from public repositories. You can build each repository from source or it may just be easier to copy the files from the SDK into your system paths. There are also Ubuntu packages that makes installing these files even easier (see packages).

If you want to install SDK files to your system directories, here are some examples to do so. (Note: some system paths could be different depending on what Linux distro you use)

  • Vulkan Header Files
    • sudo cp -r $VULKAN_SDK/include/vulkan/ /usr/local/include/
  • Vulkan Loader Files
    • sudo cp -P $VULKAN_SDK/lib/libvulkan.so* /usr/local/lib/
  • Vulkan Layer Files
    • sudo cp $VULKAN_SDK/lib/libVkLayer_*.so /usr/local/lib/
    • sudo mkdir -p /usr/local/share/vulkan/explicit_layer.d
    • sudo cp $VULKAN_SDK/etc/vulkan/explicit_layer.d/VkLayer_*.json /usr/local/share/vulkan/explicit_layer.d

You may need to run sudo ldconfig to refresh system loader search cache.

Next Steps

This guide provides an introduction to the main components and tools in the Vulkan SDK. Refer to the Vulkan SDK Download Site for the most up to date SDK information, including the complete set of SDK documentation.

Источник

Читайте также:  При установке windows не находит драйвер cd rom
Оцените статью