v3dv: assign driver locations on fragment shader output variables
We were getting driver location 0 on all output variables, which meant
that our color writes were always being redirected to render target 0.
Fixes dEQP-VK.pipeline.framebuffer_attachment.diff_* which uses multiple
render targets.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
diff --git a/src/broadcom/vulkan/v3dv_pipeline.c b/src/broadcom/vulkan/v3dv_pipeline.c
index 5b0ff85..662289b 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -446,6 +446,9 @@
static void
lower_fs_outputs(nir_shader *nir)
{
+ nir_assign_io_var_locations(nir, nir_var_shader_out, &nir->num_outputs,
+ MESA_SHADER_FRAGMENT);
+
NIR_PASS_V(nir, nir_lower_io, nir_var_shader_out, type_size_vec4, 0);
}