diff options
author | Timothy Arceri <[email protected]> | 2015-11-13 11:28:20 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2015-11-18 07:30:07 +1100 |
commit | 4f4ca6b90ac33ad84bc469f58df1682e93ab3733 (patch) | |
tree | f222c0014f13afd63feb06c8c9ac43674be93057 | |
parent | a01b8c7e774aec651302fc8177b937c915daf1e7 (diff) |
glsl: remove temp variable to make code easier to read
Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r-- | src/glsl/ast_to_hir.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index d2b97d2848f..9856f16323b 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -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 */ |