};
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 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 color_interpolate[2];
ubyte color_interpolate_loc[2];
- ubyte processor;
-
int constbuf0_num_slots;
unsigned const_buffers_declared; /**< bitmask of declared const buffers */
unsigned samplers_declared; /**< bitmask of declared samplers */
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? */
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;
/* 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 */
{
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)