ac/nir, radv, radeonsi: Switch to using ac_shader_args
[mesa.git] / src / gallium / drivers / radeonsi / si_shader.h
index 2e4e4130e5cb29393240ecbf0eff376c16891f31..20f2c812c21ed87807acb920797a70352f16cf48 100644 (file)
 #include "tgsi/tgsi_scan.h"
 #include "util/u_inlines.h"
 #include "util/u_queue.h"
+#include "util/simple_mtx.h"
 
 #include "ac_binary.h"
 #include "ac_llvm_build.h"
@@ -310,7 +311,7 @@ struct si_shader_selector {
        struct util_queue_fence ready;
        struct si_compiler_ctx_state compiler_ctx_state;
 
-       mtx_t           mutex;
+       simple_mtx_t            mutex;
        struct si_shader        *first_variant; /* immutable after the first variant */
        struct si_shader        *last_variant; /* mutable */
 
@@ -327,6 +328,9 @@ struct si_shader_selector {
 
        struct tgsi_token       *tokens;
        struct nir_shader       *nir;
+       void                    *nir_binary;
+       unsigned                nir_size;
+
        struct pipe_stream_output_info  so;
        struct tgsi_shader_info         info;
        struct tgsi_tessctrl_info       tcs_info;
@@ -336,8 +340,6 @@ struct si_shader_selector {
        bool            vs_needs_prolog;
        bool            force_correct_derivs_after_kill;
        bool            prim_discard_cs_allowed;
-       bool            ngg_writes_edgeflag;
-       bool            pos_writes_edgeflag;
        unsigned        pa_cl_vs_out_cntl;
        ubyte           clipdist_mask;
        ubyte           culldist_mask;
@@ -711,6 +713,7 @@ struct si_shader {
        /*For save precompute registers value */
        unsigned vgt_tf_param; /* VGT_TF_PARAM */
        unsigned vgt_vertex_reuse_block_cntl; /* VGT_VERTEX_REUSE_BLOCK_CNTL */
+       unsigned pa_cl_vs_out_cntl;
        unsigned ge_cntl;
 };
 
@@ -756,9 +759,8 @@ void si_nir_scan_shader(const struct nir_shader *nir,
                        struct tgsi_shader_info *info);
 void si_nir_scan_tess_ctrl(const struct nir_shader *nir,
                           struct tgsi_tessctrl_info *out);
-void si_nir_lower_ps_inputs(struct nir_shader *nir);
-void si_lower_nir(struct si_shader_selector *sel, unsigned wave_size);
-void si_nir_opts(struct nir_shader *nir);
+void si_nir_adjust_driver_locations(struct nir_shader *nir);
+void si_finalize_nir(struct pipe_screen *screen, void *nirptr, bool optimize);
 
 /* si_state_shaders.c */
 void gfx9_get_gs_info(struct si_shader_selector *es,