diff options
author | Hans-Kristian Arntzen <post@arntzen-software.no> | 2019-07-23 20:14:13 +0300 |
---|---|---|
committer | Hans-Kristian Arntzen <post@arntzen-software.no> | 2019-07-23 20:18:44 +0300 |
commit | 18bcc9b79077fe179318f607d348ff35afd24f6a (patch) | |
tree | 47e7023a0bccf7d5bedd15e1f87ff61329650aae /spirv_cross.hpp | |
parent | 8ba0507a6d00cb7b4290ece14df4af0b79325ed8 (diff) |
Do not disable temporary forwarding when we suppress usage tracking.
This subtle bug removed any expression validation for trivially swizzled
variables. Make usage suppression a more explicit concept rather than
just hacking off forwarded_temporaries.
There is some fallout here with loop generation since our expression
invalidation is currently a bit too naive to handle loops properly.
The forwarding bug masked this problem until now.
If part of the loop condition is also used in the body, we end up
reading an invalid expression, which in turn forces a temporary to be
generated in the condition block, not good. We'll need to be smarter
here ...
Diffstat (limited to 'spirv_cross.hpp')
-rw-r--r-- | spirv_cross.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/spirv_cross.hpp b/spirv_cross.hpp index 20609274..deb757af 100644 --- a/spirv_cross.hpp +++ b/spirv_cross.hpp @@ -814,6 +814,7 @@ protected: std::unordered_set<uint32_t> forced_temporaries; std::unordered_set<uint32_t> forwarded_temporaries; + std::unordered_set<uint32_t> suppressed_usage_tracking; std::unordered_set<uint32_t> hoisted_temporaries; Bitset active_input_builtins; |