radeonsi: remove si_shader_selector::type
[mesa.git] / src / gallium / drivers / radeonsi / si_shader.h
index b46a48380e035d8aa930888ab2901a4bad728bf3..838fc9f823ec1ecdd0671c2977df938980e10e2a 100644 (file)
@@ -319,19 +319,22 @@ struct si_compiler_ctx_state {
 };
 
 struct si_shader_info {
+   gl_shader_stage stage;
+
    ubyte num_inputs;
    ubyte num_outputs;
    ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
    ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
    ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
-   ubyte input_interpolate_loc[PIPE_MAX_SHADER_INPUTS];
    ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS];
    ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
    ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
    ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS];
+   ubyte output_readmask[PIPE_MAX_SHADER_OUTPUTS];
    ubyte output_streams[PIPE_MAX_SHADER_OUTPUTS];
 
-   ubyte processor;
+   ubyte color_interpolate[2];
+   ubyte color_interpolate_loc[2];
 
    int constbuf0_num_slots;
    unsigned const_buffers_declared; /**< bitmask of declared const buffers */
@@ -340,13 +343,6 @@ struct si_shader_info {
 
    uint num_memory_instructions; /**< sampler, buffer, and image instructions */
 
-   /**
-    * If a tessellation control shader reads outputs, this describes which ones.
-    */
-   bool reads_pervertex_outputs;
-   bool reads_perpatch_outputs;
-   bool reads_tessfactor_outputs;
-
    ubyte colors_read; /**< which color components are read by the FS */
    ubyte colors_written;
    bool reads_samplemask;   /**< does fragment shader read sample mask? */
@@ -435,8 +431,8 @@ struct si_shader_selector {
    struct pipe_stream_output_info so;
    struct si_shader_info info;
 
-   /* PIPE_SHADER_[VERTEX|FRAGMENT|...] */
-   enum pipe_shader_type type;
+   ubyte const_and_shader_buf_descriptors_index;
+   ubyte sampler_and_images_descriptors_index;
    bool vs_needs_prolog;
    bool prim_discard_cs_allowed;
    bool ngg_culling_allowed;
@@ -866,7 +862,6 @@ struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen,
 
 /* si_shader_nir.c */
 void si_nir_scan_shader(const struct nir_shader *nir, struct si_shader_info *info);
-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 */
@@ -894,9 +889,9 @@ static inline bool gfx10_is_ngg_passthrough(struct si_shader *shader)
 {
    struct si_shader_selector *sel = shader->selector;
 
-   return sel->type != PIPE_SHADER_GEOMETRY && !sel->so.num_outputs && !sel->info.writes_edgeflag &&
+   return sel->info.stage != MESA_SHADER_GEOMETRY && !sel->so.num_outputs && !sel->info.writes_edgeflag &&
           !shader->key.opt.ngg_culling &&
-          (sel->type != PIPE_SHADER_VERTEX || !shader->key.mono.u.vs_export_prim_id);
+          (sel->info.stage != MESA_SHADER_VERTEX || !shader->key.mono.u.vs_export_prim_id);
 }
 
 static inline bool si_shader_uses_bindless_samplers(struct si_shader_selector *selector)