mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
nir: fix uniform cloning helper again
UBOs in different stages can have the same instance name for
different UBOs so here we make sure to also check that types match
before deciding we have a match.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13254
Fixes: b47b8d16d9 ("nir: expose reusable linking helpers for cloning uniform loads")
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37428>
This commit is contained in:
parent
b9a1bcd3a1
commit
870ce22754
1 changed files with 1 additions and 0 deletions
|
|
@ -1173,6 +1173,7 @@ nir_clone_uniform_variable(nir_shader *nir, nir_variable *uniform, bool spirv)
|
|||
v->data.binding == uniform->data.binding) ||
|
||||
(!spirv &&
|
||||
(!strcmp(uniform->name, v->name) &&
|
||||
glsl_type_compare_no_precision(uniform->type, v->type) &&
|
||||
uniform->data.explicit_binding == v->data.explicit_binding &&
|
||||
uniform->data.binding == v->data.binding))) {
|
||||
new_var = v;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue