[Mesa-dev] [RFCv3 00/11] gallium: add support for NIR as alternate IR
Roland Scheidegger
sroland at vmware.com
Mon Feb 1 15:16:32 UTC 2016
For the first 2 in the series:
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Am 31.01.2016 um 21:16 schrieb Rob Clark:
> From: Rob Clark <robclark at freedesktop.org>
>
> Ok, v3 of something I've been working on here and there for a while..
>
> Since the last time I've sent this patchset, I've added support for
> lowering drawpix/bitmap in NIR, as well as a NIR equiv to tgsi_emulate.
> In addition, I've added a pass to lower builtin uniforms, for reasons
> describes in 10/11. And in general organized things a bit better and
> fixed a whole lot of stuff.
>
> I think I've addressed all the review comments from the previous
> round. Thanks for those.
>
> At this point, the only regressions are with variable-indexing stuff,
> and the issue there is entirely in freedreno/ir3 backend. So from a
> functional standpoint, I think the gallium/mesa-st NIR support is
> ready to go, with just cosmetic changes remaining. But of course this
> would be a good time for review comments ;-)
>
> IMHO the major remaining TODO item is how to populate the 'struct
> nir_shader_compiler_options'. Some, but far from all is available in
> shader caps. But adding a bunch of shader caps now, and then more
> later every time the compiler_options struct is extended doesn't sound
> like fun. It would be kind of nice if the pipe driver could return
> the compiler_options to use directly.
>
> As before, the latest is at:
>
> https://github.com/freedreno/mesa/commits/wip-gallium-skip-tgsi
>
>
> Rob Clark (11):
> gallium: refactor pipe_shader_state to support multiple IR's
> gallium: add NIR as a possible IR
> nir: add helper to calculate type size
> nir: allow pre-resolved sampler uniform locations
> nir: add lowering pass for y-transform
> nir: add lowering pass for glDrawPixels
> nir: add lowering pass for glBitmap
> gallium/auxiliary: introduce nir_emulate
> glsl: export accessor for builtin-uniform descriptors
> mesa/st: add nir pass for lowering builtin uniforms
> mesa/st: add support for NIR as possible driver IR
>
> src/compiler/Makefile.sources | 3 +
> src/compiler/glsl/builtin_variables.cpp | 24 +-
> src/compiler/glsl/ir.h | 3 +
> src/compiler/nir/nir.h | 34 +++
> src/compiler/nir/nir_builder.h | 2 +-
> src/compiler/nir/nir_lower_bitmap.c | 166 +++++++++++
> src/compiler/nir/nir_lower_drawpixels.c | 252 ++++++++++++++++
> src/compiler/nir/nir_lower_samplers.c | 23 +-
> src/compiler/nir/nir_lower_wpos_ytransform.c | 317 ++++++++++++++++++++
> src/compiler/nir_types.cpp | 75 +++++
> src/compiler/nir_types.h | 3 +
> src/gallium/auxiliary/Makefile.sources | 2 +
> src/gallium/auxiliary/hud/hud_context.c | 9 +-
> src/gallium/auxiliary/nir/nir_emulate.c | 177 +++++++++++
> src/gallium/auxiliary/nir/nir_emulate.h | 34 +++
> src/gallium/auxiliary/postprocess/pp_run.c | 3 +-
> src/gallium/auxiliary/tgsi/tgsi_ureg.c | 4 +-
> src/gallium/auxiliary/util/u_simple_shaders.c | 18 +-
> src/gallium/auxiliary/util/u_tests.c | 3 +-
> src/gallium/include/pipe/p_defines.h | 13 +-
> src/gallium/include/pipe/p_state.h | 32 +-
> src/mesa/Makefile.sources | 3 +
> src/mesa/state_tracker/st_glsl_to_nir.cpp | 407 ++++++++++++++++++++++++++
> src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 147 ++++------
> src/mesa/state_tracker/st_glsl_to_tgsi.h | 5 +
> src/mesa/state_tracker/st_nir.h | 51 ++++
> src/mesa/state_tracker/st_nir_lower_builtin.c | 207 +++++++++++++
> src/mesa/state_tracker/st_program.c | 171 +++++++++--
> src/mesa/state_tracker/st_program.h | 6 +
> 29 files changed, 2037 insertions(+), 157 deletions(-)
> create mode 100644 src/compiler/nir/nir_lower_bitmap.c
> create mode 100644 src/compiler/nir/nir_lower_drawpixels.c
> create mode 100644 src/compiler/nir/nir_lower_wpos_ytransform.c
> create mode 100644 src/gallium/auxiliary/nir/nir_emulate.c
> create mode 100644 src/gallium/auxiliary/nir/nir_emulate.h
> create mode 100644 src/mesa/state_tracker/st_glsl_to_nir.cpp
> create mode 100644 src/mesa/state_tracker/st_nir.h
> create mode 100644 src/mesa/state_tracker/st_nir_lower_builtin.c
>
More information about the mesa-dev
mailing list