Skip to content

tgsi_to_nir: only update TGSI properties of the current shader stage

This MR tries to fix a regression detected in v3d after !1544 (merged) landed.

The implementation introduced in "tgsi_to_nir: be careful about not losing any TGSI properties silently (v2)" updates all the TGSI properties, but it didn't take into account that the shader_info structure uses a union to store the different attributes for each shader stage.

Now we only update the attributes if they affect current shader stage, avoiding to overwrite members of the union that should be overwritten. This has created hundreds of regressions in v3d.

For example the TGSI_PROPERTY_VS_BLIT_SGPRS_AMD was overwritting the same position used by TGSI_PROPERY_CS_FIXED_BLOCK_DEPTH.

Fixes: e3003651 ("tgsi_to_nir: be careful about not losing any TGSI properties silently (v2)")

Merge request reports