用于替换 Vulkan 共享库,以实现对旧硬件的兼容性
Ashes is a drop-in replacement or ICD to Vulkan.
It allows writing Vulkan code, and selecting the rendering API that will be used.
It also comes with ashespp, a C++ wrapper for Vulkan.
To build it, you can use CMake.
Three workflows are possible:
Just set the environment variable VK_ICD_FILENAMES to one of the jsons in Ashes' install dir, and you're done.
You load Ashes' shared library instead of Vulkan's, and you're done.
The API selection will be done on first call of vkGetInstanceProcAddr (for dynamic loader), or on first Vulkan API call (for static loader).
You can ask for the list of loaded plugins, through a call to the function int ashEnumeratePlugins( uint32_t * count , AshPluginDescription * plugins );.
It works as Vulkan ones : if plugins is set to NULL, count will then contain the number of loaded plugins.
The following API is available, in ashes.h:
…From this, you can retrieve the supported rendering APIs, check the features they support, activate the one you want/can use.
Here is a small example, to select the rendering API from a command-line option:
…Ashes relies on CMake as project generator. The easiest way to build it is to use the presets already defined:
You can reach me on the Discord server dedicated to my projects: DragonJoker's Lair
Ashes is validated using Sascha Willems' Vulkan examples repository.
I've forked it, to be able to test the drivers.
These applications are used to validate the basic functionalities of the ashespp library.
Most basic example, initialises the logical device.
Another simple test, checking that swapchain creation succeeds.
Tests vertex layouts, by displaying a coloured rectangle.
Tests transfers to VRAM using staging buffers.
Tests texture 1D load and display.
Tests texture 2D load and display.
Demonstrates load and display of a 3D texture.
Loads a cube texture and displays it as a skybox.
Tests texture buffer load and display.
Tests loading a texture 2D, compressed in either BC3, ASTC 8x8 or ETC2, depending on support by the rendering API.
Tests loading a texture 2D array, compressed in either BC3, ASTC 8x8 or ETC2, depending on support by the rendering API.
Tests loading a texture 2D and its mipmap levels from a file.
Tests loading a texture 2D from a file, and generating its mipmaps from level 0.
Tests the usage of uniform buffers.
Demonstrates the use of push constants, by displaying two cubes with different colour modifiers, stored in push constants.
Tests render to cube, by taking an equirectangular texture, and loading it into a skybox.
Tests frame buffers, and index buffers too.
Tests depth buffer, depth test, and multiple uniform buffers.
Tests hardware instantiation, by rendering 1'000'000 cubes.
Tests Compute pipeline, by processing the output of the PushConstants sample to add a graphical effect.
Takes the push constant test case and uses dynamic buffer descriptor instead of multiple descriptors.
Tests the specialisation constants in Vulkan (matching them with uniforms in OpenGL renderers).
Tests the specialisation constants in Vulkan and OpenGL renderers (as long as they support SPIRV shaders).
Bloom implementation using downscale through mipmaps.
These applications use the library in a more complex way, closer to what would be done within an engine.
Loads an object, with textures, and displays it.
Applies lights to the previously loaded object.
Applies normal mapping.
Deferred rendering implementation for opaque objects
Billboards sample.
暂无开放 Issues,或尚未同步最近议题。