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 8a626df commit 978aa89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GPU/Common/PostShader.cpp
Expand Up @@ -204,6 +204,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 978aa89

Please sign in to comment.