mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
linker: Slight code rearrange to prevent duplication in the next commit
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
a529acfb2b
commit
392fabcfee
1 changed files with 6 additions and 7 deletions
|
|
@ -928,13 +928,12 @@ link_update_uniform_buffer_variables(struct gl_linked_shader *shader)
|
|||
if ((ptrdiff_t) l != (end - begin))
|
||||
continue;
|
||||
|
||||
if (strncmp(var->name, begin, l) == 0) {
|
||||
found = true;
|
||||
var->data.location = j;
|
||||
break;
|
||||
}
|
||||
} else if (!strcmp(var->name, blks[i]->Uniforms[j].Name)) {
|
||||
found = true;
|
||||
found = strncmp(var->name, begin, l) == 0;
|
||||
} else {
|
||||
found = strcmp(var->name, blks[i]->Uniforms[j].Name) == 0;
|
||||
}
|
||||
|
||||
if (found) {
|
||||
var->data.location = j;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue