mesa/src/amd/drm-shim
Marek Olšák bfb6c41b64
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
amd: remove unnecessary and transitive #includes
Reported by clang tools.
See: https://clangd.llvm.org/guides/include-cleaner

struct ac_cmdbuf had to be moved to ac_cmdbuf_base.h because we can't
include ac_cmdbuf.h->sid.h->amdgfxregs.h in radeon_winsys.h for r300.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41091>
2026-04-24 21:53:07 +00:00
..
amdgpu_dump_states.c Revert ABI breakage "amd: Add user queue HQD count to hw_ip info" 2025-11-02 02:54:59 +00:00
amdgpu_noop_drm_shim.c amd: remove unnecessary and transitive #includes 2026-04-24 21:53:07 +00:00
amdgpu_noop_drm_shim.h amd/drm-shim: export a function that allows to select a different device 2025-11-20 09:53:29 +00:00
meson.build ac/tests: use amdgpu shim devices 2026-04-14 12:06:20 +00:00
radeon_noop_drm_shim.c mesa: replace most occurrences of getenv() with os_get_option() 2025-11-06 04:36:13 +00:00
README.md amd/drm-shim: update README about which file to modify 2023-05-19 06:59:30 +00:00

radeon_noop backend

This implements the minimum of the radeon kernel driver in order to make shader-db work. The submit ioctl is stubbed out to not execute anything.

Export MESA_LOADER_DRIVER_OVERRIDE=r300 LD_PRELOAD=$prefix/lib/libradeon_noop_drm_shim.so. (or r600 for r600-class HW)

By default, rv515 is exposed. The chip can be selected an environment variable like RADEON_GPU_ID=CAYMAN or RADEON_GPU_ID=0x6740.

amdgpu_noop backend

This implements the minimum of the amdgpu kernel driver. The submit ioctl is stubbed out to not execute anything.

Export LD_PRELOAD=$prefix/lib/libamdgpu_noop_drm_shim.so.

To specify the device to expose, set the environment variable AMDGPU_GPU_ID to

  • renoir to expose a CHIP_RENOIR device
  • raven to expose a CHIP_RAVEN device
  • stoney to expose a CHIP_STONEY device

Further names follow the CHIP_* enum values. By default, the CHIP_RENOIR device is exposed.

To add a new device, amdgpu_devices.c needs to be modified. amdgpu_dump_states can be used to dump the relevant states from a real device.