+ if (emit->unit == PIPE_SHADER_FRAGMENT) {
+ if (emit->key.fs.white_fragments) {
+ /* Used for XOR logicop mode */
+ emit->output_map[idx] = dst_register(SVGA3DREG_TEMP,
+ emit->nr_hw_temp++);
+ emit->temp_color_output[idx] = emit->output_map[idx];
+ emit->true_color_output[idx] = dst_register(SVGA3DREG_COLOROUT,
+ semantic.Index);
+ }
+ else if (emit->key.fs.write_color0_to_n_cbufs) {
+ /* We'll write color output [0] to all render targets.
+ * Prepare all the output registers here, but only when the
+ * semantic.Index == 0 so we don't do this more than once.
+ */
+ if (semantic.Index == 0) {
+ unsigned i;
+ for (i = 0; i < emit->key.fs.write_color0_to_n_cbufs; i++) {
+ emit->output_map[idx+i] = dst_register(SVGA3DREG_TEMP,
+ emit->nr_hw_temp++);
+ emit->temp_color_output[i] = emit->output_map[idx+i];
+ emit->true_color_output[i] = dst_register(SVGA3DREG_COLOROUT,
+ i);
+ }
+ }
+ }
+ else {
+ emit->output_map[idx] =
+ dst_register(SVGA3DREG_COLOROUT, semantic.Index);
+ }
+ }
+ else {
+ emit->output_map[idx] = dst_register(SVGA3DREG_COLOROUT,
+ semantic.Index);
+ }