nir: Fix printing of ~0 .locations.
I kept wondering what "429" meant in variable declarations, when it was just a truncated ~0 snprintf. Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3423> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3423>
This commit is contained in:
@@ -562,9 +562,13 @@ print_var_decl(nir_variable *var, print_state *state)
|
||||
}
|
||||
|
||||
if (!loc) {
|
||||
if (var->data.location == ~0) {
|
||||
loc = "~0";
|
||||
} else {
|
||||
snprintf(buf, sizeof(buf), "%u", var->data.location);
|
||||
loc = buf;
|
||||
}
|
||||
}
|
||||
|
||||
/* For shader I/O vars that have been split to components or packed,
|
||||
* print the fractional location within the input/output.
|
||||
|
Reference in New Issue
Block a user