radv: remove unnecessary vs_common_out.export_viewport_index

This was only used when the FS needs the viewport index if it's not
exported by the previous stage. Though, this is actually useless
because the driver will emit 0 for the PS input in this case.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13061>
This commit is contained in:
Samuel Pitoiset
2021-09-27 12:00:24 +02:00
committed by Marge Bot
parent 7594d4ae2c
commit a35cfa77f6
3 changed files with 0 additions and 22 deletions

View File

@@ -2872,16 +2872,12 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
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.

View File

@@ -55,7 +55,6 @@ struct radv_vs_out_key {
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 {

View File

@@ -637,23 +637,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
}
}
/* 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) {