HLSL: More robust handling of bad shader input, catching a few more things.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user