Module: Mesa Branch: main Commit: 19e5b4cf2e642174a0facb3f0e496a25b61ad2e3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=19e5b4cf2e642174a0facb3f0e496a25b61ad2e3
Author: Samuel Pitoiset <[email protected]> Date: Mon Sep 27 12:05:51 2021 +0200 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 <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13061> --- src/amd/vulkan/radv_pipeline.c | 4 ---- src/amd/vulkan/radv_shader.h | 1 - src/amd/vulkan/radv_shader_info.c | 17 ----------------- 3 files changed, 22 deletions(-) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 99478b9a521..d80dc9a3700 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -2868,14 +2868,10 @@ radv_fill_shader_info(struct radv_pipeline *pipeline, /* TODO: These are no longer used as keys we should refactor this */ keys[MESA_SHADER_VERTEX].vs_common_out.export_prim_id = 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 = !!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls; 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; diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 449d8dac700..4055d709837 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -53,7 +53,6 @@ struct radv_vs_out_key { uint32_t as_ngg : 1; uint32_t as_ngg_passthrough : 1; uint32_t export_prim_id : 1; - uint32_t export_layer_id : 1; uint32_t export_clip_dists : 1; }; diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index fb77f59c529..5f30a4b6153 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -586,23 +586,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n nir->info.stage == MESA_SHADER_GEOMETRY) 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. */ if (key->has_multiview_view_index) { switch (nir->info.stage) {
