Nouveau Developer Working On OpenGL Extension To Help With Reverse-Engineering

Written by Michael Larabel in Mesa on 15 April 2019 at 04:10 AM EDT. 31 Comments
MESA
Longtime open-source NVIDIA "Nouveau" driver developer Ilia Mirkin is drafting a new OpenGL extension proposal for helping out in driver reverse-engineering efforts.

The proposed GL_MESA_debug_operations extension is about making it easier to insert arbitrary commands into existing shaders to better understand these operations in different combinations. This extension is designed to help reverse engineering activities like Nouveau as they try to understand NVIDIA's hardware behavior but could have use-cases by other reverse-engineered OpenGL drivers like Freedreno, Panfrost / Lima, Etnaviv, and others. It's also possible this could be used as a sorts of testing/fuzzing different shader operations/behavior.

Ilia Mirkin describes the MESA_debug_operations proposal as:
Hardware often has operations which have poorly understood semantics, especially in combination with flags, modes, etc. As such, it can be desirable to insert those operations in the middle of an existing shader to see what they will do.

Options for doing this are few -- either a complete separate stack needs to be created in order to be able to submit this shader to the hardware and collect results, or an existing operation needs to be taken over. Doing this leads one to have to deal with all the existing limitations of that operation.

This extension introduces generic operations that may be used during reverse engineering activities. These operations are easily inserted into a shader and the driver may easily be modified to perform whatever operation is desired when seeing these new generic operations.

The extension hasn't yet been sent over to Khronos / OpenGL Working Group but on Sunday was announced on Mesa-dev for discussion by Mesa developers.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week