nir: preserve explicit_binding in lower_atomics_to_ssbo

it's important to be able to tell whether this is explicitly set by the
user

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7489>
This commit is contained in:
Mike Blumenkrantz 2020-08-07 16:19:19 -04:00 committed by Marge Bot
parent 8553e1cb71
commit b5fb66a5ed

View file

@ -205,6 +205,7 @@ nir_lower_atomics_to_ssbo(nir_shader *shader)
ssbo = nir_variable_create(shader, nir_var_mem_ssbo, type, name);
ssbo->data.binding = ssbo_offset + var->data.binding;
ssbo->data.explicit_binding = var->data.explicit_binding;
/* We can't use num_abos, because it only represents the number of
* active atomic counters, and currently unlike SSBO's they aren't