Skip to content

anv: limit compiler valid color outputs using NIR variables

This fixes a test from the vkd3d-proton test_dual_source_blending_dxbc test which asserts in the backend with :

brw_fs_visitor.cpp:716: void fs_visitor::emit_fb_writes(): Assertion `!prog_data->dual_src_blend || key->nr_color_regions == 1' failed.

This is because there is 2 color attachments provided by the renderpass so we initially set nr_color_regions = 2. But once we've parsed the shader, we can see it's only using one output (with dual source color blending).

This change looks at the output variables to update the valid output variables.

Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com Cc: mesa-stable

Merge request reports