On 12 August 2017 at 16:29, Robert Xiao brx@cs.cmu.edu wrote:
Hmm, I did not know that. Can we do
((GLuint64)1) << 62
Yeah, that should work. Not sure there's a reason to prefer it over "~(GLuint64)0 >> 1" though.
Also, I am a little confused about your comment that the patch doesn't preserve the low bits. My aim was to keep 0xffff0000 in the low 32 bits - doesn't "- 0xffff" achieve that goal?
No, that gets you 0x3fffffffffff0001. But as I said, I don't think it matters. ~0xffff was chosen because it was an easy to write value smaller than 0xfffffffffffffbff, not because it was otherwise special.