[Mesa-dev] [PATCH 0/6] radv: Rewrite local & shared variable handling

Connor Abbott cwabbott0 at gmail.com
Thu Jul 6 21:20:59 UTC 2017


On Thu, Jul 6, 2017 at 12:48 PM, Connor Abbott
<connora at valvesoftware.com> wrote:
> From: Connor Abbott <cwabbott0 at gmail.com>
>
> This series grew out of trying to get rid of the copy-n-pasted index
> calculation code in radv's NIR-to-LLVM path, in particular in
> radv_get_deref_offset(). I realized for IO it's probably better to
> switch to using nir_lower_io after Nicolai's series, but for local
> variables and shared variables which can't be accessed by the host and
> don't have to match between stages, it's simpler to translate the NIR
> variable directly into an LLVM variable instead.
>
> This cleanup gives us indirect addressing of local variables without
> generating if-ladders in NIR for free, and makes our shared variable
> handling much better which fixes an upcoming Feral title.

Sorry, I worded this wrong -- I don't have any inside information on
Feral titles, and Alex's original patch didn't mention any upcoming
titles. I apologize for any confusion.

> It should also
> let LLVM do its thing much better, even better than the existing
> radeonsi path, by preserving type information that TGSI doesn't for
> local variables.
>
> Connor Abbott (6):
>   nir: don't segfault when printing variables with no name
>   nir/lower_io_to_temporaries: don't set compact on shadow vars
>   ac/nir: rewrite local variable handling
>   ac/nir: rewrite shared variable handling
>   radv: reorder and add passes to match i965
>   radv: don't lower indirect derefs
>
>  src/amd/common/ac_nir_to_llvm.c                | 310 +++++++++++++------------
>  src/amd/vulkan/radv_pipeline.c                 |  28 ++-
>  src/compiler/nir/nir_lower_io_to_temporaries.c |   1 +
>  src/compiler/nir/nir_print.c                   |   2 +-
>  4 files changed, 187 insertions(+), 154 deletions(-)
>
> --
> 2.9.4
>


More information about the mesa-dev mailing list