From: Rob Clark <robcl...@freedesktop.org> Signed-off-by: Rob Clark <robcl...@freedesktop.org> --- src/gallium/include/pipe/p_defines.h | 1 + src/gallium/include/pipe/p_state.h | 6 ++++++ 2 files changed, 7 insertions(+)
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 3a1c691..1365d66 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -731,6 +731,7 @@ enum pipe_shader_ir PIPE_SHADER_IR_TGSI = 0, PIPE_SHADER_IR_LLVM, PIPE_SHADER_IR_NATIVE, + PIPE_SHADER_IR_NIR, }; /** diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 31e512c..3caa75e 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -221,6 +221,11 @@ struct pipe_stream_output_info * * TODO pipe_compute_state should probably get similar treatment to handle * multiple IR's in a cleaner way.. + * + * NOTE: since it is expected that the consumer will want to perform + * additional passes on the nir_shader, the driver takes ownership of + * the nir_shader. If state trackers need to hang on to the IR (for + * example, variant management), it should use nir_shader_clone(). */ struct pipe_shader_state { @@ -230,6 +235,7 @@ struct pipe_shader_state union { void *llvm; void *native; + void *nir; } ir; struct pipe_stream_output_info stream_output; }; -- 2.5.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev