radv: remove unnecessary vs_common_out.export_layer_id
Same as the viewport index, 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:

committed by
Marge Bot

parent
a35cfa77f6
commit
19e5b4cf2e
@@ -2868,14 +2868,10 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
|
|||||||
/* TODO: These are no longer used as keys we should refactor this */
|
/* TODO: These are no longer used as keys we should refactor this */
|
||||||
keys[MESA_SHADER_VERTEX].vs_common_out.export_prim_id =
|
keys[MESA_SHADER_VERTEX].vs_common_out.export_prim_id =
|
||||||
infos[MESA_SHADER_FRAGMENT].ps.prim_id_input;
|
infos[MESA_SHADER_FRAGMENT].ps.prim_id_input;
|
||||||
keys[MESA_SHADER_VERTEX].vs_common_out.export_layer_id =
|
|
||||||
infos[MESA_SHADER_FRAGMENT].ps.layer_input;
|
|
||||||
keys[MESA_SHADER_VERTEX].vs_common_out.export_clip_dists =
|
keys[MESA_SHADER_VERTEX].vs_common_out.export_clip_dists =
|
||||||
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
|
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
|
||||||
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_prim_id =
|
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_prim_id =
|
||||||
infos[MESA_SHADER_FRAGMENT].ps.prim_id_input;
|
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 =
|
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_clip_dists =
|
||||||
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
|
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls;
|
||||||
|
|
||||||
|
@@ -53,7 +53,6 @@ struct radv_vs_out_key {
|
|||||||
uint32_t as_ngg : 1;
|
uint32_t as_ngg : 1;
|
||||||
uint32_t as_ngg_passthrough : 1;
|
uint32_t as_ngg_passthrough : 1;
|
||||||
uint32_t export_prim_id : 1;
|
uint32_t export_prim_id : 1;
|
||||||
uint32_t export_layer_id : 1;
|
|
||||||
uint32_t export_clip_dists : 1;
|
uint32_t export_clip_dists : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -586,23 +586,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
|
|||||||
nir->info.stage == MESA_SHADER_GEOMETRY)
|
nir->info.stage == MESA_SHADER_GEOMETRY)
|
||||||
gather_xfb_info(nir, info);
|
gather_xfb_info(nir, info);
|
||||||
|
|
||||||
/* Make sure to export the LayerID if the fragment shader needs it. */
|
|
||||||
if (key->vs_common_out.export_layer_id) {
|
|
||||||
switch (nir->info.stage) {
|
|
||||||
case MESA_SHADER_VERTEX:
|
|
||||||
info->vs.output_usage_mask[VARYING_SLOT_LAYER] |= 0x1;
|
|
||||||
break;
|
|
||||||
case MESA_SHADER_TESS_EVAL:
|
|
||||||
info->tes.output_usage_mask[VARYING_SLOT_LAYER] |= 0x1;
|
|
||||||
break;
|
|
||||||
case MESA_SHADER_GEOMETRY:
|
|
||||||
info->gs.output_usage_mask[VARYING_SLOT_LAYER] |= 0x1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Make sure to export the LayerID if the subpass has multiviews. */
|
/* Make sure to export the LayerID if the subpass has multiviews. */
|
||||||
if (key->has_multiview_view_index) {
|
if (key->has_multiview_view_index) {
|
||||||
switch (nir->info.stage) {
|
switch (nir->info.stage) {
|
||||||
|
Reference in New Issue
Block a user