HLSL: More robust handling of bad shader input, catching a few more things.

This commit is contained in:
John Kessenich
2016-12-14 17:02:32 -07:00
parent dca93d6baa
commit 1e275c8486
6 changed files with 82 additions and 74 deletions

View File

@@ -2144,6 +2144,7 @@ void Builder::accessChainPushSwizzle(std::vector<unsigned>& swizzle, Id preSwizz
std::vector<unsigned> oldSwizzle = accessChain.swizzle;
accessChain.swizzle.resize(0);
for (unsigned int i = 0; i < swizzle.size(); ++i) {
assert(swizzle[i] < oldSwizzle.size());
accessChain.swizzle.push_back(oldSwizzle[swizzle[i]]);
}
} else