wheremyfoodat / Panda3DS

HLE 3DS emulator
https://panda3ds.com/
GNU General Public License v3.0
790 stars 57 forks source link

Use `std::bitset` for shader bit-iterations #472

Closed Wunkolo closed 3 months ago

Wunkolo commented 3 months ago

Uses std::bitset for bool-uniforms and component-mask iteration: https://en.cppreference.com/w/cpp/utility/bitset

wheremyfoodat commented 3 months ago

I'm not sure I feel particularly great about using bitset for the boolean uniforms, especially when they are directly accessed in JIT code and the standard doesn't guarantee a specific size or layout, nor do I really think it reduces the mental overhead for the component mask stuff...