bool uses_bindless_samplers;
bool uses_bindless_images;
bool uses_fbfetch;
- unsigned clipdist_writemask;
- unsigned culldist_writemask;
- unsigned num_written_culldistance;
- unsigned num_written_clipdistance;
/** Whether all codepaths write tess factors in all invocations. */
bool tessfactors_are_def_in_all_invocs;
}
info->constbuf0_num_slots = nir->num_uniforms;
- info->num_written_clipdistance = nir->info.clip_distance_array_size;
- info->num_written_culldistance = nir->info.cull_distance_array_size;
- info->clipdist_writemask = u_bit_consecutive(0, info->num_written_clipdistance);
- info->culldist_writemask = u_bit_consecutive(0, info->num_written_culldistance);
if (info->stage == MESA_SHADER_FRAGMENT)
info->uses_kill = nir->info.fs.uses_discard;
struct si_shader_selector *ps = sctx->ps_shader.cso;
key->opt.clip_disable = sctx->queued.named.rasterizer->clip_plane_enable == 0 &&
- (vs->info.clipdist_writemask || vs->info.writes_clipvertex) &&
- !vs->info.culldist_writemask;
+ (vs->info.base.clip_distance_array_size || vs->info.writes_clipvertex) &&
+ !vs->info.base.cull_distance_array_size;
/* Find out if PS is disabled. */
bool ps_disabled = true;
if (sctx->chip_class <= GFX9)
sel->pa_cl_vs_out_cntl = si_get_vs_out_cntl(sel, false);
- sel->clipdist_mask = sel->info.writes_clipvertex ? SIX_BITS : sel->info.clipdist_writemask;
- sel->culldist_mask = sel->info.culldist_writemask << sel->info.num_written_clipdistance;
+ sel->clipdist_mask = sel->info.writes_clipvertex ? SIX_BITS :
+ u_bit_consecutive(0, sel->info.base.clip_distance_array_size);
+ sel->culldist_mask = u_bit_consecutive(0, sel->info.base.cull_distance_array_size) <<
+ sel->info.base.clip_distance_array_size;
/* DB_SHADER_CONTROL */
sel->db_shader_control = S_02880C_Z_EXPORT_ENABLE(sel->info.writes_z) |