You'll need to first install meson and ninja to perform this build: you'll use meson to configure options for the build and ninja to install it. The amber branch file can be found here, you'll need to download it:
https://gitlab.freedesktop.org/mesa/mesa/-/tree/amber/. The folder you put into will be the source directory, create another folder that's not in the same directory, that will be your build directory.
The meson.build file contains the drivers it'll be installing during the setup so you can reference this file in case it has issues finding a driver during the setup which you can comment out to skipping install them.
You can cd into the source directory to run the command:
meson setup *path to build directory*
This will read the meson.build file and run those the list of drivers to be build for the setup. If there are errors most likely it's missing certain drivers not found in your current system. For example, it posted an error with the nouveau driver since it's not available with mesa-dri, I comment it out from the file to skip checking it.
Once it completes, you'll want to run the command:
meson *path to build directory* -Damber=true
You can see all the options by running
meson configure but that's the logic that need to be enabled from their writing.
Next you'll need to performing the compiling process:
ninja -C *path to build directory*
ninja -C *path to build directory* install
During the completion of the step, the drivers will be located at /usr/local/lib/dri.
There is another post that was referenced earlier:
https://forums.freebsd.org/threads/mesa-missing-i915-driver.88338/#post-616388 that compile the mesa-dri port which can create the driver, this step involves disabling all other drivers since it'll look at the staging folder (this behavior is setup by pkg-plist file), OP also upload the i915 driver that you can move to the dri folder.