Hardware tests for the ATI Rage128 and R100. Used for validation of the ati-vga QEMU display device. These tests are intended to be run on real ATI hardware and then also run on QEMU for validation.
If running Nix or NixOS the flake.nix includes a dev shell with all required dependencies. If not, the following are required:
- gcc
- make
- pciutils
Then: make
There are a lot of assumptions made about the state of the system when running
these tests. I've run them in QEMU and on real hardware running Debian Lenny and
Debian Squeeze. Before running the tests it's required to start a minimal X
environment: Xorg :0. The xserver-xorg-video-r128 driver must also be compiled
with DRI disabled to force use of MMIO. The version distributed with Debian
is compiled with DRI which will always use CCE (not yet supported in QEMU ati-vga).
The Xorg display should be configured at 640x480 @ 32-bit color (BGRA).
The setup is a bit involved, hopefully I can provide a QCOW2 image in the future.
To run all tests: ./run-tests.
Individual tests can be run with: ./run-tests <TEST_NAME1> <TEST_NAME2>.
The tests will require root privileges to access hardware.
Adding tests to existing files in /tests is easy:
- Add a new function prefixed with test_*.
- Add a new
register_test()call to the test registration function.
Adding a new tests file is only a little bit more involved:
- Create a new file in /tests.
- Add a test and a registration function.
- Call the registration function from
register_all_tests()in main.c.
The fixtures directory contains dumps of VRAM for comparison in subsequent test runs. If a fixture doesn't exist the test will ask you if you would like to create it. Obviously this should probably only be done on real hardware for comparison against later runs on the emulated card.
- clipping: Scissor register latching and clipping behavior
- pitch_offset_cntl: Source/destination pitch and offset control registers
- host_data: HOST_DATA FIFO, monochrome expansion, bit packing
- rop3: ROP3 operations with color sources and memory blits