Introducing the r600/NIR back-end



Even though the hardware served by the r600 driver is ageing, it is still in wide use, and high-end cards from that generation will still deliver good performance for mid-range gaming. When the drivers were originally implemented, TGSI was the dominating intermediate representation (IR) used by the shader compilers in Mesa. Several years back, NIR (new intermediate representation) was introduced, which has since been adopted by most drivers in Mesa. Among other things, NIR allows adding hardware specific opcodes that make it easy to transform the shader code to something that can easily be translated into hardware specific assembly. (To learn more about the features of NIR, take a look at Jason Ekstrand's excellent blog post.)
With that in mind, and the general sentiment that I should learn something about NIR, I got the idea to implement a NIR back-end for the r600 hardware while I was at XDC 2018. At that time, the driver created non-optimized assembly from the TGSI, which was then optimized by SB, an optimizer that was added in 2013 to the r600 driver. This optimizer has quite a few quirks; it does not work for compute or tessellation shaders, or shaders that use images or atomic operations. On top of that, it has some bugs that are difficult to fix because the code base is not well documented and difficult to understand.
-

- Login or register to post comments
Printer-friendly version- 1118 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
today's howtos
|
Open Hardware: XON/XOFF and Raspberry Pi Pico
|
Security Leftovers
|
How to Apply Accent Colour in Ubuntu Desktop
A step-by-step tutorial on how to apply accent colour in Ubuntu desktop (GNOME) with tips for Kubuntu and others.
|





This section of TuxMachines will no longer have new stories in it (with some caveats, including this post). To see the latest stories go to 

.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
2 days 1 hour ago
2 days 5 hours ago
2 days 5 hours ago
3 days 12 hours ago
3 days 13 hours ago
3 days 14 hours ago
3 days 14 hours ago
3 days 15 hours ago
3 days 17 hours ago
3 days 19 hours ago