GithubHelp home page GithubHelp logo

keyframe / vkdevicechooser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aejsmith/vkdevicechooser

0.0 0.0 0.0 90 KB

Vulkan layer to force a specific device to be used

License: MIT License

C++ 93.13% Meson 6.87%

vkdevicechooser's Introduction

Vulkan Device Chooser Layer

This is a quick and dirty implementation of a Vulkan layer to force a specific physical device to be used. This is useful for Vulkan games which do not provide an option to choose the device themselves.

Compiling requires vulkan/vulkan.h, vulkan/vk_layer.h and vulkan/vk_layer_dispatch_table.h. On Debian based systems, you can install these with:

sudo apt-get install libvulkan-dev vulkan-validationlayers-dev

On Fedora, you can install these with:

sudo dnf install vulkan-headers vulkan-validation-layers-devel

Build and install with:

meson builddir --prefix=/usr
meson compile -C builddir
sudo meson install -C builddir

This will install to the system's Vulkan layer directory, /usr/share/vulkan/implicit_layer.d/.

To run a Vulkan application forcing a specific device to be used, launch it with these environment variables:

ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=<device index>

Replace <device index> with the "GPU id" for the desired device as reported by vulkaninfo (without the layer enabled).

For example:

$ ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=1 vulkaninfo

should give info for the device which had GPU id 1 when running vulkaninfo without the environment variable set.

The layer can be used with Steam games by setting their launch options to:

ENABLE_DEVICE_CHOOSER_LAYER=1 VULKAN_DEVICE_INDEX=<device index> %command%

vkdevicechooser's People

Contributors

aejsmith avatar keyframe avatar stephanlachnit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.