From 4f4ca6b90ac33ad84bc469f58df1682e93ab3733 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Fri, 13 Nov 2015 11:28:20 +1100 Subject: [PATCH] glsl: remove temp variable to make code easier to read Reviewed-by: Emil Velikov --- src/glsl/ast_to_hir.cpp | 17 +++++++---------- 1 file 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 */ -- 2.30.2