Rework management of probabilities in spirv-fuzz (#2839)
Before this change there was quite a lot of duplication in the code being used to choose random percentages, and some of it was incorrect so that a percentage chance of (100-N)% instead of N% was being used. Also there was a lot of duplicate code to choose a random index into a vector. This change eliminates that duplication (fixing up the percentage problem), and gets rid of direct access to the random number generator being used for fuzzing, so that all randomization requests must go through the FuzzerContext class, discouraging future ad-hoc uses of the random number generator.
Loading
Please register or sign in to comment