Skip to content

Commit

Permalink
List Lavapipe as another CPU implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
serenity4 committed Jul 14, 2024
1 parent e3ae7f8 commit 203daf1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ In particular, because the library relies on automatic code generation, there ma

## Testing

Currently, continuous integration runs only on Ubuntu 32/64 bits, for lack of a functional CI setup with Vulkan for MacOS and Windows. Because public CI services lack proper driver support, the CPU Vulkan implementation [SwiftShader](https://github.com/google/swiftshader) is used.
Currently, continuous integration runs only on Ubuntu 32/64 bits, for lack of a functional CI setup with Vulkan for MacOS and Windows. Because public CI services lack proper driver support, the CPU Vulkan implementation [Lavapipe](https://docs.mesa3d.org/drivers/llvmpipe.html) is used.
If you are not on Linux, we cannot guarantee that this library will work for you, although so far nothing is platform-dependent. If that is the case, we recommend that you test this package with your own setup.
10 changes: 10 additions & 0 deletions docs/src/utility.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Feel free to check out the official [Vulkan website](https://www.vulkan.org/) fo

### CPU implementation of Vulkan

#### SwiftShader

[SwiftShader](https://github.com/google/swiftshader) is a CPU implementation of Vulkan primarily designed to extend the portability of Vulkan applications. It can be used wherever there is a lack of proper driver support, including public continuous integration services. This allows for example to evaluate code when generating a documentation in CI with [Documenter.jl](https://github.com/JuliaDocs/Documenter.jl), like this one.

SwiftShader is available as a JLL package. You can add it with
Expand All @@ -39,3 +41,11 @@ set_driver(:SwiftShader)
```

which will tell the Vulkan Loader to use the SwiftShader Installable Client Driver.

#### Lavapipe

[Lavapipe](https://docs.mesa3d.org/drivers/llvmpipe.html) is another CPU implementation of Vulkan, developed by Mesa as part of its Gallium stack.

This one was deemed to be too much of a hassle to setup with the Artifact system; instead, the [julia-lavapipe](https://github.com/marketplace/actions/julia-lavapipe) action was added for GitHub Actions for use in CI using `apt` to install the driver. At the time of writing, this action only supports Linux runners with the latest Ubuntu version, but contributions are encouraged to provide support for other platforms and setups.

If you want to take on the task of adding Lavapipe to Yggdrasil, that would be greatly appreciated and would result in a more convenient setup than a GitHub Action, but do expect a big rabbit hole.
8 changes: 0 additions & 8 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# Set libname for the loader (must be done before importing Vulkan).
# This is mandatory in cases where the default libname used by VulkanCore does not point to a valid Vulkan library.
# import SwiftShader_jll
# ENV["JULIA_VULKAN_LIBNAME"] = basename(SwiftShader_jll.libvulkan)

using Test
using Vulkan
using Accessors: @set

# Use SwiftShader for testing.
# set_driver(:SwiftShader)

@testset "Vulkan.jl" begin
include("handles.jl")
include("api.jl")
Expand Down

0 comments on commit 203daf1

Please sign in to comment.