diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index e8957d92d66..d1743dd30e7 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -1305,6 +1305,12 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info, */ info->has_ngg_fully_culled_bug = info->gfx_level == GFX10; + /* On newer chips, it is not necessary for NGG shaders to request + * the allocation of GS space in passthrough mode, when they set + * PRIMGEN_PASSTHRU_NO_MSG. + */ + info->has_ngg_passthru_no_msg = info->family >= CHIP_NAVI23; + info->has_export_conflict_bug = info->gfx_level == GFX11; /* The hw starts culling after all exports are finished, diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index d79a11029f2..55d4a424d71 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -116,6 +116,7 @@ struct radeon_info { bool never_send_perfcounter_stop; bool discardable_allows_big_page; bool has_ngg_fully_culled_bug; + bool has_ngg_passthru_no_msg; bool has_export_conflict_bug; bool has_attr_ring_wait_bug; bool has_vrs_ds_export_bug; diff --git a/src/amd/common/nir/ac_nir_lower_ngg.c b/src/amd/common/nir/ac_nir_lower_ngg.c index 1f036dbc47e..a6e6dfb463b 100644 --- a/src/amd/common/nir/ac_nir_lower_ngg.c +++ b/src/amd/common/nir/ac_nir_lower_ngg.c @@ -1782,7 +1782,7 @@ ac_nir_lower_ngg_nogs(nir_shader *shader, const ac_nir_lower_ngg_options *option if (!options->can_cull) { /* Newer chips can use PRIMGEN_PASSTHRU_NO_MSG to skip gs_alloc_req for NGG passthrough. */ - if (!(options->passthrough && options->family >= CHIP_NAVI23)) { + if (!(options->passthrough && options->hw_info->has_ngg_passthru_no_msg)) { /* Allocate export space on wave 0 - confirm to the HW that we want to use all possible space */ nir_if *if_wave_0 = nir_push_if(b, nir_ieq_imm(b, nir_load_subgroup_id(b), 0)); { diff --git a/src/amd/vulkan/winsys/null/radv_null_winsys.c b/src/amd/vulkan/winsys/null/radv_null_winsys.c index 39745b93e6c..7f51657c0ac 100644 --- a/src/amd/vulkan/winsys/null/radv_null_winsys.c +++ b/src/amd/vulkan/winsys/null/radv_null_winsys.c @@ -120,6 +120,7 @@ radv_null_winsys_query_info(struct radeon_winsys *rws, struct radeon_info *gpu_i gpu_info->has_attr_ring = gpu_info->gfx_level >= GFX11; gpu_info->has_attr_ring_wait_bug = gpu_info->gfx_level == GFX11 || gpu_info->gfx_level == GFX11_5; gpu_info->has_ngg_fully_culled_bug = gpu_info->gfx_level == GFX10; + gpu_info->has_ngg_passthru_no_msg = gpu_info->family >= CHIP_NAVI23; if (gpu_info->family == CHIP_NAVI31 || gpu_info->family == CHIP_NAVI32) gpu_info->num_physical_wave64_vgprs_per_simd = 768;