[Mesa-dev] [PATCH 00/28] i965/blorp: Use NIR for compiling shaders

Pohjolainen, Topi topi.pohjolainen at intel.com
Wed May 11 16:28:59 UTC 2016

On Tue, May 10, 2016 at 04:16:20PM -0700, Jason Ekstrand wrote:
> When Paul originally wrote blorp he hand-rolled a shader builder that
> builds i965 shaders directly.  This has caused headaches because every time
> we make a change to the back-end compiler, we have to update blorp.  NIR on
> the other hand tends to be more stable at this point since it has many
> different users all across mesa.
> Using NIR also means that we get decent optimizations, register allocation,
> and scheduling.  The original blorp codegen code tried fairly hard to emit
> reasonably efficient code in that it didn't do more work than needed but it
> was fairly naieve when it came to register allocation and scheduling.
> Using the full compiler stack also means that we get new features for free
> without having to re-implement them in blorp.  On Sky Lake, for instance,
> we are now generating shaders with sampler-EOT.
> In spite of all this, this series shows no measurable performance
> difference on Haswell with every benchmark in sixonyx run 25 times.
> Jason Ekstrand (28):
>   nir: Add an info bit for uses_sample_qualifier
>   i965/fs: Rework the persample shading key/prog_data bits
>   i965/state: Clean up WM/PS state to pull more things out of prog_data
>   i965/fs: Clean up the logic in compile_fs a bit
>   i965/fs: Stop setting dispatch_grf_start_reg from the visitor
>   i965/gen7_wm: Move where we set the fast clear op
>   i965/fs: Organize prog_data by ksp number rather than SIMD width
>   i965/blorp: Simplify the sample layout calculation
>   i965/fs: Use MRF0 for the repclear message
>   nir/builder: Generate the alu helpers directly in python
>   nir/builder: Add a helper for grabbing multiple channels from an ssa
>     def
>   nir: Add texture opcodes and source types for multisample compression
>   i965/fs: Implement the new NIR MCS texturing
>   i965/blorp: Add a prog_data_init helper
>   i965/blorp: Add a param array to prog_data
>   blorp: Add initial state setup support for SIMD8 dispatch
>   i965/blorp: Add a helper for compiling NIR shaders
>   i965/blorp: Create the program key in get_clear_kernel
>   i965/blorp: Use NIR for clear shaders
>   i965/blorp: Refactor getting the blit kernel into a helper

I had a few questions but 14-20 are:

Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>

More information about the mesa-dev mailing list