radv: remove duplicated code about NGG passthrough determination

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13243>
This commit is contained in:
Samuel Pitoiset 2021-10-07 10:26:46 +02:00
parent 6bfe65d1dc
commit cd4a52b52c
1 changed files with 3 additions and 7 deletions

View File

@ -2801,6 +2801,9 @@ radv_determine_ngg_settings(struct radv_pipeline *pipeline,
DIV_ROUND_UP(lds_bytes_if_culling_off,
device->physical_device->rad_info.lds_encode_granularity);
/* NGG passthrough mode should be disabled when culling and when the vertex shader exports the
* primitive ID.
*/
infos[es_stage].is_ngg_passthrough = infos[es_stage].is_ngg_passthrough &&
!infos[es_stage].has_ngg_culling &&
!(es_stage == MESA_SHADER_VERTEX &&
@ -2911,13 +2914,6 @@ radv_fill_shader_info(struct radv_pipeline *pipeline,
}
}
/* NGG passthrough mode can't be enabled for vertex shaders
* that export the primitive ID.
*/
if (nir[MESA_SHADER_VERTEX] && infos[MESA_SHADER_VERTEX].vs.outinfo.export_prim_id) {
infos[MESA_SHADER_VERTEX].is_ngg_passthrough = false;
}
filled_stages |= (1 << MESA_SHADER_FRAGMENT);
}