mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 14:10:37 +02:00
glsl: remove temp variable to make code easier to read
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
a01b8c7e77
commit
4f4ca6b90a
1 changed files with 7 additions and 10 deletions
|
|
@ -6245,20 +6245,17 @@ ast_process_struct_or_iface_block_members(exec_list *instructions,
|
|||
/* For readonly and writeonly qualifiers the field definition,
|
||||
* if set, overwrites the layout qualifier.
|
||||
*/
|
||||
bool read_only = layout->flags.q.read_only;
|
||||
bool write_only = layout->flags.q.write_only;
|
||||
|
||||
if (qual->flags.q.read_only) {
|
||||
read_only = true;
|
||||
write_only = false;
|
||||
fields[i].image_read_only = true;
|
||||
fields[i].image_write_only = false;
|
||||
} else if (qual->flags.q.write_only) {
|
||||
read_only = false;
|
||||
write_only = true;
|
||||
fields[i].image_read_only = false;
|
||||
fields[i].image_write_only = true;
|
||||
} else {
|
||||
fields[i].image_read_only = layout->flags.q.read_only;
|
||||
fields[i].image_write_only = layout->flags.q.write_only;
|
||||
}
|
||||
|
||||
fields[i].image_read_only = read_only;
|
||||
fields[i].image_write_only = write_only;
|
||||
|
||||
/* For other qualifiers, we set the flag if either the layout
|
||||
* qualifier or the field qualifier are set
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue