zink: pre-convert mode in fixup_io_locations

no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24608>
This commit is contained in:
Mike Blumenkrantz 2023-08-10 07:46:08 -04:00 committed by Marge Bot
parent 52c57667ed
commit b24911e5db

View file

@ -4754,6 +4754,7 @@ fixup_io_locations(nir_shader *nir)
else
modes = nir->info.stage == MESA_SHADER_FRAGMENT ? nir_var_shader_in : nir_var_shader_out;
u_foreach_bit(mode, modes) {
nir_variable_mode m = BITFIELD_BIT(mode);
/* i/o interface blocks are required to be EXACT matches between stages:
* iterate over all locations and set locations incrementally
*/
@ -4763,7 +4764,7 @@ fixup_io_locations(nir_shader *nir)
continue;
bool found = false;
unsigned size = 0;
nir_foreach_variable_with_modes(var, nir, 1<<mode) {
nir_foreach_variable_with_modes(var, nir, m) {
if (var->data.location != i)
continue;
/* only add slots for non-component vars or first-time component vars */