Skip to content

Commit d2478b2

Browse files
Merge pull request #2428 from KhronosGroup/pr2427
Land PR #2427
2 parents 022aad4 + 67dfa0d commit d2478b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spirv_glsl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11766,10 +11766,10 @@ void CompilerGLSL::disallow_forwarding_in_expression_chain(const SPIRExpression
1176611766
// Allow trivially forwarded expressions like OpLoad or trivial shuffles,
1176711767
// these will be marked as having suppressed usage tracking.
1176811768
// Our only concern is to make sure arithmetic operations are done in similar ways.
11769-
if (expression_is_forwarded(expr.self) && !expression_suppresses_usage_tracking(expr.self) &&
11770-
forced_invariant_temporaries.count(expr.self) == 0)
11769+
if (forced_invariant_temporaries.count(expr.self) == 0)
1177111770
{
11772-
force_temporary_and_recompile(expr.self);
11771+
if (!expression_suppresses_usage_tracking(expr.self))
11772+
force_temporary_and_recompile(expr.self);
1177311773
forced_invariant_temporaries.insert(expr.self);
1177411774

1177511775
for (auto &dependent : expr.invariance_dependencies)

0 commit comments

Comments
 (0)