};
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 */
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? */
unsigned num_written_clipdistance;
unsigned images_declared; /**< bitmask of declared images */
+ unsigned image_buffers; /**< bitmask of images that are buffers */
unsigned msaa_images_declared; /**< bitmask of declared MSAA images */
unsigned shader_buffers_declared; /**< bitmask of declared shader buffers */
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;
+ ubyte cs_shaderbufs_sgpr_index;
+ ubyte cs_num_shaderbufs_in_user_sgprs;
+ ubyte cs_images_sgpr_index;
+ ubyte cs_images_num_sgprs;
+ ubyte cs_num_images_in_user_sgprs;
unsigned num_vs_inputs;
unsigned num_vbos_in_user_sgprs;
unsigned pa_cl_vs_out_cntl;
uint64_t inputs_read; /* "get_unique_index" bits */
/* bitmasks of used descriptor slots */
- uint32_t active_const_and_shader_buffers;
+ uint64_t active_const_and_shader_buffers;
uint64_t active_samplers_and_images;
};
/* 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)