radv: enable pipelinestat query emulation for legacy GS

This will allow us to fix a bug with the number of geometry shader
invocations which increase for NGG VS or TES but shouldn't. And also
for simplifying the NGG vs legacy query path.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231>
This commit is contained in:
Samuel Pitoiset
2023-07-19 09:08:31 +02:00
parent 96b97ed527
commit f13ff5e70e

View File

@@ -639,11 +639,13 @@ radv_postprocess_nir(struct radv_device *device, const struct radv_pipeline_layo
stage->info.outinfo.export_prim_id, false, false, stage->info.force_vrs_per_vertex); stage->info.outinfo.export_prim_id, false, false, stage->info.force_vrs_per_vertex);
} else { } else {
bool emulate_ngg_gs_query_pipeline_stat = device->physical_device->emulate_ngg_gs_query_pipeline_stat;
ac_nir_gs_output_info gs_out_info = { ac_nir_gs_output_info gs_out_info = {
.streams = stage->info.gs.output_streams, .streams = stage->info.gs.output_streams,
.usage_mask = stage->info.gs.output_usage_mask, .usage_mask = stage->info.gs.output_usage_mask,
}; };
NIR_PASS_V(stage->nir, ac_nir_lower_legacy_gs, false, false, &gs_out_info); NIR_PASS_V(stage->nir, ac_nir_lower_legacy_gs, false, emulate_ngg_gs_query_pipeline_stat, &gs_out_info);
} }
} else if (stage->stage == MESA_SHADER_FRAGMENT) { } else if (stage->stage == MESA_SHADER_FRAGMENT) {
ac_nir_lower_ps_options options = { ac_nir_lower_ps_options options = {