From: Timothy Arceri Date: Fri, 13 Nov 2015 00:28:20 +0000 (+1100) Subject: glsl: remove temp variable to make code easier to read X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f4ca6b90ac33ad84bc469f58df1682e93ab3733;p=mesa.git glsl: remove temp variable to make code easier to read Reviewed-by: Emil Velikov --- 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 */