radv: fix dual source blending
[mesa.git] / src / amd / common / ac_nir_to_llvm.c
index d66fefbe954bebda267a68c03fe8f29845a95dea..90ee917d13b47a1a0a0484baef42c6acee3d6a4e 100644 (file)
@@ -4125,7 +4125,7 @@ static void
 handle_shader_output_decl(struct nir_to_llvm_context *ctx,
                          struct nir_variable *variable)
 {
-       int idx = variable->data.location;
+       int idx = variable->data.location + variable->data.index;
        unsigned attrib_count = glsl_count_attribute_slots(variable->type, false);
 
        variable->data.driver_location = idx * 4;
@@ -4155,7 +4155,7 @@ handle_shader_output_decl(struct nir_to_llvm_context *ctx,
                                       si_build_alloca_undef(ctx, ctx->f32, "");
                }
        }
-       ctx->output_mask |= ((1ull << attrib_count) - 1) << variable->data.location;
+       ctx->output_mask |= ((1ull << attrib_count) - 1) << idx;
 }
 
 static void