mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-02 05:16:19 +12:00
Use std::bitset
for shader bit-iterations
Uses `std::bitset` for bool-uniforms and component-mask iteration: https://en.cppreference.com/w/cpp/utility/bitset
This commit is contained in:
parent
5284109fd4
commit
0015227f96
3 changed files with 73 additions and 71 deletions
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <cstring>
|
||||
|
||||
#include "PICA/float_types.hpp"
|
||||
|
@ -90,7 +90,7 @@ class PICAShader {
|
|||
public:
|
||||
// These are placed close to the temp registers and co because it helps the JIT generate better code
|
||||
u32 entrypoint = 0; // Initial shader PC
|
||||
u32 boolUniform;
|
||||
std::bitset<16> boolUniform;
|
||||
std::array<std::array<u8, 4>, 4> intUniforms;
|
||||
alignas(16) std::array<vec4f, 96> floatUniforms;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue