mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 09:10:12 +01:00
glsl2: Don't claim a match on structure types with different field names.
We regularly do lookups on the field names of the structure to find the types within the struct, so returning a structure type with bad names will lead to lots of error types being found.
This commit is contained in:
parent
094cf8c199
commit
b6e92ad7da
1 changed files with 5 additions and 2 deletions
|
|
@ -438,10 +438,13 @@ glsl_type::record_key_compare(const void *a, const void *b)
|
|||
if (key1->length != key2->length)
|
||||
return 1;
|
||||
|
||||
for (unsigned i = 0; i < key1->length; i++)
|
||||
/* FINISHME: Is the name of the structure field also significant? */
|
||||
for (unsigned i = 0; i < key1->length; i++) {
|
||||
if (key1->fields.structure[i].type != key2->fields.structure[i].type)
|
||||
return 1;
|
||||
if (strcmp(key1->fields.structure[i].name,
|
||||
key2->fields.structure[i].name) != 0)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue