infos[MESA_SHADER_FRAGMENT].ps.layer_input;
keys[MESA_SHADER_VERTEX].vs_common_out.export_clip_dists =
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
- keys[MESA_SHADER_VERTEX].vs_common_out.export_viewport_index =
- infos[MESA_SHADER_FRAGMENT].ps.viewport_index_input;
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_prim_id =
infos[MESA_SHADER_FRAGMENT].ps.prim_id_input;
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_layer_id =
infos[MESA_SHADER_FRAGMENT].ps.layer_input;
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_clip_dists =
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
- keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_viewport_index =
- infos[MESA_SHADER_FRAGMENT].ps.viewport_index_input;
/* NGG passthrough mode can't be enabled for vertex shaders
* that export the primitive ID.
uint32_t export_prim_id : 1;
uint32_t export_layer_id : 1;
uint32_t export_clip_dists : 1;
- uint32_t export_viewport_index : 1;
};
struct radv_vs_variant_key {
}
}
- /* Make sure to export the ViewportIndex if the fragment shader needs it. */
- if (key->vs_common_out.export_viewport_index) {
- switch (nir->info.stage) {
- case MESA_SHADER_VERTEX:
- info->vs.output_usage_mask[VARYING_SLOT_VIEWPORT] |= 0x1;
- break;
- case MESA_SHADER_TESS_EVAL:
- info->tes.output_usage_mask[VARYING_SLOT_VIEWPORT] |= 0x1;
- break;
- case MESA_SHADER_GEOMETRY:
- info->gs.output_usage_mask[VARYING_SLOT_VIEWPORT] |= 0x1;
- break;
- default:
- break;
- }
- }
-
/* Make sure to export the clip/cull distances if the fragment shader needs it. */
if (key->vs_common_out.export_clip_dists) {
switch (nir->info.stage) {