summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_eu.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-31 21:56:43 -0700
committerJason Ekstrand <[email protected]>2017-11-07 10:37:52 -0800
commit6132992cdb858268af0e985727d80e4140be389c (patch)
treefaf89c223c5cbb174c0bf97aea7f9ed950c9eff1 /src/intel/compiler/brw_eu.c
parent295605c930270a5b90f847b79474507d8b0c9e9c (diff)
intel/compiler/fs: Set up subgroup invocation as a system value
Subgroup invocation is computed using a vector immediate and some dispatch-aware arithmetic. Unfortunately, due to the vector arithmetic, and the fact that it's frequently read 16-wide, it's not something that can easily be CSEd by the back-end compiler. There are a few different possible approaches to this problem: 1) Emit the code to calculate the subgroup invocation on-the-fly and trust NIR to do the CSE. This is what we were doing. 2) Add a back-end instruction for the subgroup ID. This has the advantage of helping the back-end compiler with CSE but has the downside of very poor scheduling for the calculation because it has to be emitted in the back-end. 3) Emit the calculation at the top of the program and re-use the result. This gets rid of the CSE problem but comes at the cost of an extra live register. This commit switches us from 1) to 3). We choose to store the subgroup invocation values as a W type to reduce the impact of the extra live register. Trusting NIR and using 1) was fine but we're soon going to want to use the subgroup invocation value for other things in the back-end compiler and this makes it much easier to do without having to worry about CSE problems. Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_eu.c')
0 files changed, 0 insertions, 0 deletions