Skip to content

iris: implement indirect draw generation

What does this MR do and why?

Much like with Anv this optimization is massive boost on workloads using huge amounts of draw indirects (GravityMark is a typical example).

The Anv implementation relied on glsl shaders to implement the optimization. The shader code was turned into SPIRV data that lived in the driver.

This MR changes this mechanism to use OpenCL code instead. intel-clc is modified to produce serialized NIR code that lives in the drivers. This avoids having to parse SPIRV code at runtime (which we don't want in Iris).

An additional benefit is that we get to write Genxml style code in opencl shaders. This allows shader code to be compiled per platform much like C code of the various drivers.

Huge thanks to @alyssa for coming up with the idea and implementation of using OpenCL functions.

Also many thanks to @jenatali for helping out figuring out all the lowering issues from OpenCL code.

Edited by Lionel Landwerlin

Merge request reports