HLSL: More robust handling of bad shader input, catching a few more things.
This commit is contained in:
parent
dca93d6baa
commit
1e275c8486
6 changed files with 82 additions and 74 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue