Fuzzing Graphics Shaders
- Mentors
- Paul Thomson, Alastair Donaldson
- Organization
- Android Graphics Tools Team
SPIRV-Tools is a collection of tools to work on SPIR-V modules. One of these tools is spirv-fuzz. It applies semantics-preserving transformations to a SPIR-V module, that we call the reference module, to obtain a modified variant module. Theoretically, a semantics-preserving transformation should not change the behaviour of the code. In this way, the reference and variant modules can be run, and the outputs compared. The output is usually an image. If the images differ, this probably indicates a shader compiler bug. This is a specialised form of fuzzing that uses a technique called metamorphic testing.
This project involved using the metamorphic testing approach to extend spirv-fuzz by adding new transformations to cover instructions and patterns of SPIR-V that were not previously covered by existing spirv-fuzz transformations. Also, the project used tools such as CLSmith and clspv to improve spirv-fuzz.