diff options
author | Tom Stellard <[email protected]> | 2016-07-20 14:32:59 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2016-09-16 23:07:10 +0000 |
commit | 91ec6e5664979382f3cb18ba91edc4af99f93471 (patch) | |
tree | d74ca48acd4b5765a8bc3f52ca5f221d0275cb8a /src/mesa/main | |
parent | a2b8346fa6c96af6b3d83b9f9ebb1f500e0da5f1 (diff) |
radeonsi/compute: Use the HSA abi for non-TGSI compute shaders v3
This patch switches non-TGSI compute shaders over to using the HSA
ABI described here:
https://github.com/RadeonOpenCompute/ROCm-Docs/blob/master/AMDGPU-ABI.md
The HSA ABI provides a much cleaner interface for compute shaders and allows
us to share more code in the compiler with the HSA stack.
The main changes in this patch are:
- We now pass the scratch buffer resource into the shader via user sgprs
rather than using relocations.
- Grid/Block sizes are now passed to the shader via the dispatch packet
rather than at the beginning of the kernel arguments.
Typically for HSA, the CP firmware will create the dispatch packet and set
up the user sgprs automatically. However, in Mesa we let the driver do
this work. The main reason for this is that I haven't researched how to
get the CP to do all these things, and I'm not sure if it is supported
for all GPUs.
v2:
- Add comments explaining why we are setting certain bits of the scratch
resource descriptor.
v3:
- Use amdgcn-mesa-mesa3d triple instead of amdgcn--mesa3d.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/main')
0 files changed, 0 insertions, 0 deletions