diff --git a/src/amd/registers/gfx103.json b/src/amd/registers/gfx103.json index ec1f0741a43..77acb49e28b 100644 --- a/src/amd/registers/gfx103.json +++ b/src/amd/registers/gfx103.json @@ -16802,7 +16802,8 @@ {"bits": [22, 22], "name": "GS_W32_EN"}, {"bits": [23, 23], "name": "VS_W32_EN"}, {"bits": [24, 24], "name": "NGG_WAVE_ID_EN"}, - {"bits": [25, 25], "name": "PRIMGEN_PASSTHRU_EN"} + {"bits": [25, 25], "name": "PRIMGEN_PASSTHRU_EN"}, + {"bits": [26, 26], "name": "PRIMGEN_PASSTHRU_NO_MSG"} ] }, "VGT_STRMOUT_BUFFER_CONFIG": { diff --git a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c index b21e81a11e3..2538eac930d 100644 --- a/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c +++ b/src/gallium/drivers/radeonsi/gfx10_shader_ngg.c @@ -131,6 +131,11 @@ bool gfx10_ngg_export_prim_early(struct si_shader *shader) void gfx10_ngg_build_sendmsg_gs_alloc_req(struct si_shader_context *ctx) { + /* Newer chips can use PRIMGEN_PASSTHRU_NO_MSG to skip gs_alloc_req for NGG passthrough. */ + if (gfx10_is_ngg_passthrough(ctx->shader) && + ctx->screen->info.family >= CHIP_DIMGREY_CAVEFISH) + return; + ac_build_sendmsg_gs_alloc_req(&ctx->ac, get_wave_id_in_tg(ctx), ngg_get_vtx_cnt(ctx), ngg_get_prim_cnt(ctx)); } diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index dbb1b16ff70..34434094dcb 100644 --- a/src/gallium/drivers/radeonsi/si_state_shaders.c +++ b/src/gallium/drivers/radeonsi/si_state_shaders.c @@ -3906,7 +3906,9 @@ static struct si_pm4_state *si_build_vgt_shader_config(struct si_screen *screen, if (key.u.ngg) { stages |= S_028B54_PRIMGEN_EN(1) | S_028B54_GS_FAST_LAUNCH(key.u.ngg_gs_fast_launch) | S_028B54_NGG_WAVE_ID_EN(key.u.streamout) | - S_028B54_PRIMGEN_PASSTHRU_EN(key.u.ngg_passthrough); + S_028B54_PRIMGEN_PASSTHRU_EN(key.u.ngg_passthrough) | + S_028B54_PRIMGEN_PASSTHRU_NO_MSG(key.u.ngg_passthrough && + screen->info.family >= CHIP_DIMGREY_CAVEFISH); } else if (key.u.gs) stages |= S_028B54_VS_EN(V_028B54_VS_STAGE_COPY_SHADER);