s->output_types[slot] = type;
- nir_instr_remove(&intrin->instr);
+ /* Keep color output instruction if not exported in nir. */
+ if (!s->options->no_color_export ||
+ (slot < FRAG_RESULT_DATA0 && slot != FRAG_RESULT_COLOR)) {
+ nir_instr_remove(&intrin->instr);
+ }
+
return true;
}
emit_ps_mrtz_export(b, s);
+ /* When non-monolithic shader, RADV export mrtz in main part and export color in epilog. */
+ if (s->options->no_color_export)
+ return;
+
unsigned first_color_export = s->exp_num;
/* When dual src blend is enabled and we need both src0 and src1