Why is your "High-Level Shading Language" lower-level in some places than the "assembly" you compile to?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int bitfieldInsert(int base, int insert, int offset, int bits) | |
| { | |
| int mask = (-1 >> (32 - bits)) << offset; | |
| return (base & ~mask) | ((insert << offset) & mask); | |
| } | |
| ---> (in usage) | |
| bfi r7.yz, l(0, 16, 16, 0), l(0, 16, 16, 0), r8.yywy, r8.xxzx | |
| sigh. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment