Skip to content

ac/nir: don't emit duplicated parameter exports

Marek Olšák requested to merge mareko/mesa:fix-deduplicated-params into main

Can you spot the problem?

    exp param0 v6, v5, v5, v5
    exp param1 v7, off, off, off
    exp param1 v7, off, off, off

radeonsi uses ac_nir_optimize_outputs to eliminate output stores with identical SSA defs (i.e. duplicated), which then causes 2 outputs to map to the same parameter export.

This is a regression. The old LLVM code was correctly emitting each export only once. vs_output_param_mask was supposed to be used for this instead of vs_output_param_offset.

Fixes: 80506be3 - ac/nir/ngg,radv,radeonsi: nogs use ac_nir_export_(position|parameter)

Edited by Marek Olšák

Merge request reports

Loading