mesa/docs/drivers/kosmickrisp.rst
Aitor Camacho 93460e969e
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
docs,kk: Add KosmicKrisp documentation
Adds build instructions and workarounds documentation.
Workarounds documentation only has the biggest offenders and
there are probably way more in code that need yet to be
documented.

Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38232>
2025-11-12 04:23:59 +00:00

97 lines
2.3 KiB
ReStructuredText

KosmicKrisp
###########
KosmicKrisp is a Vulkan conformant implementation for macOS on Apple Silicon
hardware. It is implemented on top of Metal 4, which requires macOS 26 and up.
No iOS support is present as of now. However, iOS was taken into consideration
during development to support A14 Bionic GPUs and upwards.
Building
********
The following build instructions assume Homebrew as the package manager to
install dependencies. Homebrew homepage https://brew.sh/
Homebrew install command line:
.. code-block:: sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Terminal restart is recommended after Homebrew installation.
Requirements
============
- Xcode and Xcode command line tools
- Homebrew packages
- meson (1.9.1+, can also be installed as a Python package)
- cmake
- pkg-config
- libclc
- llvm
- spirv-llvm-translator
Due to potential conflicts, Homebrew will not add `llvm` to the path. To add
`llvm` to future terminal instances:
.. code-block:: sh
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
To add `llvm` to current terminal instance:
.. code-block:: sh
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
- Python
- Python packages
- mako
- packaging
- pyyaml
- meson (1.9.1+, if not installed through Homebrew)
Since Homebrew manages the Python environment, it is encouraged to create a
Python virtual environment and install all packages in that environment. To
create a Python virtual environment (e.g. ``$HOME/venv_mesa``):
.. code-block:: sh
python3 -m venv $HOME/venv_mesa
To enable a Python virtual environment:
.. code-block:: sh
source $HOME/venv_mesa/bin/activate
Build instructions
==================
Out of tree build directory is recommended.
Once all requirements have been installed, the following command line can be
used to create a debug build:
.. code-block:: sh
meson setup <path/to/mesa> --buildtype=debug -Dplatforms=macos -Dvulkan-drivers=kosmickrisp -Dgallium-drivers= -Dopengl=false -Dzstd=disabled
Metal workarounds
*****************
Different workarounds are applied throughout the project to avoid issues such
as:
- Metal API and Vulkan API discrepancies
- Metal bugs
- MSL compiler bugs
- MSL compiler crashes
These workarounds can be found in:
.. toctree::
:maxdepth: 1
kosmickrisp/workarounds