radv: remove vs_common_out:export_clip_dists

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/13085>
This commit is contained in:
Samuel Pitoiset
2021-09-27 15:11:15 +02:00
committed by Marge Bot
parent d17e752857
commit 0753615d10
2 changed files with 10 additions and 23 deletions

View File

@@ -2885,11 +2885,16 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
} }
} }
/* TODO: These are no longer used as keys we should refactor this */ if (!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls) {
keys[MESA_SHADER_VERTEX].vs_common_out.export_clip_dists = if (pipeline->graphics.last_vgt_api_stage == MESA_SHADER_VERTEX) {
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls; infos[MESA_SHADER_VERTEX].vs.outinfo.export_clip_dists = true;
keys[MESA_SHADER_TESS_EVAL].vs_common_out.export_clip_dists = } else if (pipeline->graphics.last_vgt_api_stage == MESA_SHADER_TESS_EVAL) {
!!infos[MESA_SHADER_FRAGMENT].ps.num_input_clips_culls; infos[MESA_SHADER_TESS_EVAL].tes.outinfo.export_clip_dists = true;
} else {
assert(pipeline->graphics.last_vgt_api_stage == MESA_SHADER_GEOMETRY);
infos[MESA_SHADER_GEOMETRY].vs.outinfo.export_clip_dists = true;
}
}
/* NGG passthrough mode can't be enabled for vertex shaders /* NGG passthrough mode can't be enabled for vertex shaders
* that export the primitive ID. * that export the primitive ID.

View File

@@ -603,24 +603,6 @@ radv_nir_shader_info_pass(struct radv_device *device, const struct nir_shader *n
} }
} }
/* 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) {
case MESA_SHADER_VERTEX:
info->vs.outinfo.export_clip_dists = true;
break;
case MESA_SHADER_TESS_EVAL:
info->tes.outinfo.export_clip_dists = true;
break;
case MESA_SHADER_GEOMETRY:
info->vs.outinfo.export_clip_dists = true;
break;
default:
break;
}
}
if (nir->info.stage == MESA_SHADER_FRAGMENT) if (nir->info.stage == MESA_SHADER_FRAGMENT)
info->ps.num_interp = nir->num_inputs; info->ps.num_interp = nir->num_inputs;