zink: always unset var->data.explicit_xfb_buffer

ensure that this isn't accidentally triggering for non-xfb shaders

Fixes: 6d40db84c9 ("zink: handle direct xfb output from output variables")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18784>
(cherry picked from commit 53004e57d6)
This commit is contained in:
Mike Blumenkrantz
2022-09-25 15:11:04 -04:00
committed by Dylan Baker
parent cf2be66218
commit 01edc6f174
2 changed files with 3 additions and 2 deletions

View File

@@ -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"
},

View File

@@ -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) {