Skip to content

Commit

Permalink
Merge pull request #2428 from KhronosGroup/pr2427
Browse files Browse the repository at this point in the history
Land PR #2427
  • Loading branch information
HansKristian-Work authored Dec 11, 2024
2 parents 022aad4 + 67dfa0d commit d2478b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spirv_glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11766,10 +11766,10 @@ void CompilerGLSL::disallow_forwarding_in_expression_chain(const SPIRExpression
// Allow trivially forwarded expressions like OpLoad or trivial shuffles,
// these will be marked as having suppressed usage tracking.
// Our only concern is to make sure arithmetic operations are done in similar ways.
if (expression_is_forwarded(expr.self) && !expression_suppresses_usage_tracking(expr.self) &&
forced_invariant_temporaries.count(expr.self) == 0)
if (forced_invariant_temporaries.count(expr.self) == 0)
{
force_temporary_and_recompile(expr.self);
if (!expression_suppresses_usage_tracking(expr.self))
force_temporary_and_recompile(expr.self);
forced_invariant_temporaries.insert(expr.self);

for (auto &dependent : expr.invariance_dependencies)
Expand Down

0 comments on commit d2478b2

Please sign in to comment.