diff options
author | GregF <greg@LunarG.com> | 2017-11-06 11:25:24 -0700 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2017-11-07 17:39:58 -0500 |
commit | ac04b2faeabc15811e8c542a5d7a36dbdba243b8 (patch) | |
tree | b566b174b211345866e645c3eaad8127b386e078 /source | |
parent | d86c7ce808d26e8de7f885e126803607abb85cd8 (diff) |
Opt: Fix HasLoads to not report decoration as load.
Diffstat (limited to 'source')
-rw-r--r-- | source/opt/mem_pass.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/opt/mem_pass.cpp b/source/opt/mem_pass.cpp index 02a3cc3e..e303c7ea 100644 --- a/source/opt/mem_pass.cpp +++ b/source/opt/mem_pass.cpp @@ -174,7 +174,7 @@ bool MemPass::HasLoads(uint32_t varId) const { // better handling of non-store/name. if (IsNonPtrAccessChain(op) || op == SpvOpCopyObject) { if (HasLoads(u.inst->result_id())) return true; - } else if (op != SpvOpStore && op != SpvOpName) + } else if (op != SpvOpStore && op != SpvOpName && !IsNonTypeDecorate(op)) return true; } return false; |