[Mesa-dev] [PATCH 0/9] freedreno/a5xx: basic compute shader + SSBOs
Rob Clark
robdclark at gmail.com
Tue Apr 18 22:15:52 UTC 2017
Here is an early version of basic compute shader for a5xx. I've already
pushed a bunch of cleanup/prep work for this series. In the later driver
specific parts of this series I am still fixing a couple things. And
I completely lie about image support (required for ARB_compute_shader),
so it is hidden under an FD_MESA_DEBUG=compute flag.
I figured I'd send it out in the current state to get review comments,
especially on the first two (but any suggestions on the later bits
welcome).
Image support looks like it uses a similar instruction encoding as
SSBOs (image atomics work the same way as SSBOs). And a4xx SSBO/image/
compute looks very similar to a5xx, so probably easy to get going.
(Most of the register stuff for a4xx compute is known and the remaining
few missing bits should be easy to work out. From the PoV of the
shader compiler it is the same, and SSBO/image state looks basically
the same.) Not sure how much time I'll have to work on images or
a4xx parts in the near future, but if anyone is looking for a
project...
Rob Clark (9):
nir: add pass to lower atomic counters to SSBO
mesa/st: compute+SSBO support for glsl_to_nir
freedreno/ir3: resync instr-a3xx.h/disasm-a3xx.c
freedreno: core SSBO support
freedreno/ir3: SSBO/atomic support
freedreno/a5xx: SSBO support
freedreno/ir3: compute shader support
freedreno: core compute support
freedreno/a5xx: basic experimental compute support
src/compiler/Makefile.sources | 1 +
src/compiler/nir/nir.h | 1 +
src/compiler/nir/nir_lower_atomics_to_ssbo.c | 219 ++++++++++++++++
src/gallium/drivers/freedreno/Makefile.sources | 2 +
src/gallium/drivers/freedreno/a2xx/disasm-a2xx.c | 2 +-
src/gallium/drivers/freedreno/a5xx/fd5_compute.c | 175 +++++++++++++
src/gallium/drivers/freedreno/a5xx/fd5_compute.h | 34 +++
src/gallium/drivers/freedreno/a5xx/fd5_context.c | 2 +
src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 109 ++++++++
src/gallium/drivers/freedreno/a5xx/fd5_emit.h | 3 +
src/gallium/drivers/freedreno/a5xx/fd5_program.c | 24 +-
src/gallium/drivers/freedreno/a5xx/fd5_program.h | 2 +
src/gallium/drivers/freedreno/disasm.h | 4 +
src/gallium/drivers/freedreno/freedreno_context.h | 22 +-
src/gallium/drivers/freedreno/freedreno_draw.c | 53 ++++
src/gallium/drivers/freedreno/freedreno_gmem.c | 7 +
src/gallium/drivers/freedreno/freedreno_gmem.h | 1 +
src/gallium/drivers/freedreno/freedreno_resource.c | 9 +
src/gallium/drivers/freedreno/freedreno_screen.c | 143 ++++++++++-
src/gallium/drivers/freedreno/freedreno_screen.h | 7 +
src/gallium/drivers/freedreno/freedreno_state.c | 81 ++++++
src/gallium/drivers/freedreno/freedreno_util.h | 1 +
src/gallium/drivers/freedreno/ir3/disasm-a3xx.c | 83 ++++++-
src/gallium/drivers/freedreno/ir3/instr-a3xx.h | 77 +++++-
src/gallium/drivers/freedreno/ir3/ir3.c | 74 +++++-
src/gallium/drivers/freedreno/ir3/ir3.h | 39 ++-
.../drivers/freedreno/ir3/ir3_compiler_nir.c | 276 +++++++++++++++++++--
src/gallium/drivers/freedreno/ir3/ir3_cp.c | 6 +
src/gallium/drivers/freedreno/ir3/ir3_legalize.c | 7 +-
src/gallium/drivers/freedreno/ir3/ir3_nir.c | 4 +-
src/gallium/drivers/freedreno/ir3/ir3_shader.c | 86 ++++++-
src/gallium/drivers/freedreno/ir3/ir3_shader.h | 18 +-
src/mesa/state_tracker/st_glsl_to_nir.cpp | 14 ++
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 +-
src/mesa/state_tracker/st_program.c | 13 +
src/mesa/state_tracker/st_program.h | 3 +
36 files changed, 1536 insertions(+), 69 deletions(-)
create mode 100644 src/compiler/nir/nir_lower_atomics_to_ssbo.c
create mode 100644 src/gallium/drivers/freedreno/a5xx/fd5_compute.c
create mode 100644 src/gallium/drivers/freedreno/a5xx/fd5_compute.h
--
2.9.3
More information about the mesa-dev
mailing list