radv,radeonsi: don't set LINE_STIPPLE_TEX_ENA on gfx12

Fixes: 3c5c96fedb - radv: double pixel throughput in certain cases of PS without interpolated inputs
Fixes: 5acabdd1f8 - radeonsi: double pixel throughput in certain cases of PS without inputs
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/14646

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39316>
This commit is contained in:
Marek Olšák 2026-01-14 11:44:43 -05:00 committed by Marge Bot
parent c559042a2a
commit fa88c65bb8
2 changed files with 14 additions and 2 deletions

View file

@ -3739,8 +3739,15 @@ radv_compute_spi_ps_input(const struct radv_physical_device *pdev, const struct
/* At least one of PERSP_* (0xF) or LINEAR_* (0x70) or LINE_STIPPLE_TEX must be enabled.
* LINE_STIPPLE_TEX uses the least number of initialized VGPRs, so let's use it because
* pixel throughput is limited by the number of initialized VGPRs.
*
* We can't set LINE_STIPPLE_TEX on GFX12 because it reduces primitive throughput to only
* 1 SE. Other gens are fine (tested on Navi10, Navi21, Navi31).
* TODO: Test Strix Halo.
*/
spi_ps_input |= S_0286CC_LINE_STIPPLE_TEX_ENA(1);
if (pdev->info.gfx_level == GFX12)
spi_ps_input |= S_0286CC_PERSP_SAMPLE_ENA(1);
else
spi_ps_input |= S_0286CC_LINE_STIPPLE_TEX_ENA(1);
}
return spi_ps_input;

View file

@ -525,11 +525,16 @@ void si_fixup_spi_ps_input_config(struct si_shader *shader)
/* At least one pair of barycentric coordinates or LINE_STIPPLE_TEX_ENA must be enabled.
* Since LINE_STIPPLE_TEX_ENA is the only one that loads only 1 VGPR, use it.
*
* We can't set LINE_STIPPLE_TEX_ENA on GFX12 because it reduces primitive throughput to only
* 1 SE. Other gens are fine (tested on Navi10, Navi21, Navi31).
* TODO: Test Strix Halo.
*/
if (!(shader->config.spi_ps_input_ena & 0x7f) &&
!G_0286CC_LINE_STIPPLE_TEX_ENA(shader->config.spi_ps_input_ena)) {
/* LLVM sets PERSP_SAMPLE_ENA in this case, so we have to do the same. */
if (shader->selector->info.base.use_aco_amd)
if (shader->selector->info.base.use_aco_amd &&
shader->selector->screen->info.gfx_level != GFX12)
shader->config.spi_ps_input_ena |= S_0286CC_LINE_STIPPLE_TEX_ENA(1);
else
shader->config.spi_ps_input_ena |= S_0286CC_PERSP_SAMPLE_ENA(1);