From 01edc6f174f085ca4c0f59c5101511898e877ad2 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 25 Sep 2022 15:11:04 -0400 Subject: [PATCH] zink: always unset var->data.explicit_xfb_buffer ensure that this isn't accidentally triggering for non-xfb shaders Fixes: 6d40db84c9d ("zink: handle direct xfb output from output variables") Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 53004e57d68af9673cab6195ce67213245ec149f) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_compiler.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7cab68f132f..f8ec70a372a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -607,7 +607,7 @@ "description": "zink: always unset var->data.explicit_xfb_buffer", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "6d40db84c9d507768f118fe20fc4437cbfa6be41" }, diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index 4cb03ef4cd5..44a31569d6d 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -833,7 +833,6 @@ update_so_info(struct zink_shader *zs, const struct pipe_stream_output_info *so_ bool have_fake_psiz = false; nir_foreach_shader_out_variable(var, zs->nir) { - var->data.explicit_xfb_buffer = 0; if (var->data.location == VARYING_SLOT_PSIZ && !var->data.explicit_location) have_fake_psiz = true; } @@ -3125,6 +3124,8 @@ zink_shader_create(struct zink_screen *screen, struct nir_shader *nir, NIR_PASS_V(nir, match_tex_dests); ret->nir = nir; + nir_foreach_shader_out_variable(var, nir) + var->data.explicit_xfb_buffer = 0; if (so_info && so_info->num_outputs) update_so_info(ret, so_info, nir->info.outputs_written, have_psiz); else if (have_psiz) {