diff options
| author | Niels Boehm <blubberdiblub@gmail.com> | 2017-06-22 12:36:54 +0200 |
|---|---|---|
| committer | Niels Boehm <blubberdiblub@gmail.com> | 2017-06-22 20:22:53 +0200 |
| commit | df82adca43db7f5820a27624ae3e2b60c9085efd (patch) | |
| tree | 342c33b23eb2ec4f3acb4d0bb0f3f679a542277e /Source/Core/VideoCommon/PostProcessing.cpp | |
| parent | e30484e8a7895a2a26f7e4e609c44c5b0d1c6331 (diff) | |
Add function testing whether a bitmask is valid.
This one verifies bitmasks where low bits are set to 1 (hence the name).
Any stray 0 among the lower ones or any stray 1 among the higher zeros
renders the mask invalid.
The edge cases of all zeros and all ones are considered valid masks.
It uses an efficient implementation. It's the counterpart of
https://graphics.stanford.edu/~seander/bithacks.html#DetermineIfPowerOf2
Diffstat (limited to 'Source/Core/VideoCommon/PostProcessing.cpp')
0 files changed, 0 insertions, 0 deletions
