Files
geramyloveless 8c105a22ef radv: build Mesa's Vulkan driver for macOS, and test it offline
scripts/build-radv.sh (make radv) builds RADV from third_party/mesa on
libdrm-mlg: Meson with the ACO compiler and no LLVM, no window-system
platform (headless WSI), no GL, video, zstd or SPIRV-Tools, so the driver
links only the system and libdrm-mlg. It installs a relocatable ICD into
build/radv/install (libvulkan_radeon.dylib, libdrm_mlg.dylib,
libmlg_drm.dylib, share/vulkan/icd.d/radeon_icd.json with a relative
library path) and fails if any symbol other than the weak layer
entrypoints is left unresolved. Mesa's Python generators get a virtualenv
when python3 lacks mako, PyYAML or packaging.

test-radv-offline (vulkan/tests/test_radv_offline.c) loads the ICD as the
loader does and runs it on the CS fixture device through libdrm-mlg and
the loopback transport, against unmodified upstream DRM/amdgpu: instance
and enumeration ("AMD Radeon AI Pro R9700 (RADV GFX1201)", Vulkan 1.4, PCI
bus info), device creation, host-visible memory, an empty submit with a
fence, vkCmdFillBuffer and vkCmdUpdateBuffer executed by the software GPU
and checked through the mapping, a compute pipeline compiled by ACO, and a
dispatch submitted with a timeline semaphore and a fence (the software GPU
runs no shaders, so its result is not checked). It skips when RADV has not
been built.
2026-10-03 11:19:30 -07:00

12 lines
435 B
Plaintext

// The offline RADV test's compute shader: element i of the buffer gets
// value + i. Compiled to fill.spv.h with
// glslangValidator -V --target-env vulkan1.1 --vn fill_spv fill.comp -o fill.spv.h
#version 450
layout(local_size_x = 64) in;
layout(std430, binding = 0) buffer Data { uint data[]; };
layout(push_constant) uniform Push { uint value; };
void main()
{
data[gl_GlobalInvocationID.x] = value + gl_GlobalInvocationID.x;
}