Module: Mesa
Branch: main
Commit: f13ff5e70e19153e77dfc59c66731dfd92948505
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f13ff5e70e19153e77dfc59c66731dfd92948505

Author: Samuel Pitoiset <[email protected]>
Date:   Wed Jul 19 09:08:31 2023 +0200

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231>

---

 src/amd/vulkan/radv_pipeline.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 1997c5e719b..ec5fd4dc23c 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -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);
 
       } 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 = {
             .streams = stage->info.gs.output_streams,
             .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) {
       ac_nir_lower_ps_options options = {

Reply via email to