Skip to content

Commit

Permalink
GPU: Prevent infinite loops in postshader chains.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed May 16, 2020
1 parent 0982534 commit e14f173
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GPU/Common/PostShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ std::vector<const ShaderInfo *> GetPostShaderChain(const std::string &name) {
} else {
shaderInfo = nullptr;
}
auto dup = std::find(backwards.begin(), backwards.end(), shaderInfo);
if (dup != backwards.end()) {
// Don't loop forever.
break;
}
}

if (!backwards.empty())
Expand Down

0 comments on commit e14f173

Please sign in to comment.