[d3d9] Pack RT bitmasks tightly

No need to waste a whole 32-bits for each entry here when we only have 4 possible RTs at a time.
This commit is contained in:
Joshua Ashton 2023-05-24 14:10:41 +01:00
parent 269bab2c34
commit cafd104783
2 changed files with 14 additions and 6 deletions

View File

@ -154,6 +154,14 @@ namespace dxvk {
m_flags.set(D3D9DeviceFlag::DirtyPointScale);
m_flags.set(D3D9DeviceFlag::DirtySpecializationEntries);
// Bitfields can't be initialized in header.
m_boundRTs = 0;
m_anyColorWrites = 0;
m_activeRTs = 0;
m_activeHazardsRT = 0;
m_alphaSwizzleRTs = 0;
m_lastHazardsRT = 0;
}

View File

@ -1291,15 +1291,16 @@ namespace dxvk {
uint32_t m_dirtySamplerStates = 0;
uint32_t m_dirtyTextures = 0;
uint32_t m_boundRTs = 0;
uint32_t m_anyColorWrites = 0;
uint32_t m_boundRTs : 4;
uint32_t m_anyColorWrites : 4;
uint32_t m_activeRTs : 4;
uint32_t m_activeHazardsRT : 4;
uint32_t m_alphaSwizzleRTs : 4;
uint32_t m_lastHazardsRT : 4;
uint32_t m_activeRTs = 0;
uint32_t m_activeRTTextures = 0;
uint32_t m_activeDSTextures = 0;
uint32_t m_activeHazardsRT = 0;
uint32_t m_activeHazardsDS = 0;
uint32_t m_alphaSwizzleRTs = 0;
uint32_t m_activeTextures = 0;
uint32_t m_activeTexturesToUpload = 0;
uint32_t m_activeTexturesToGen = 0;
@ -1314,7 +1315,6 @@ namespace dxvk {
uint32_t m_fetch4 = 0;
uint32_t m_lastHazardsDS = 0;
uint32_t m_lastHazardsRT = 0;
uint32_t m_lastSamplerTypesFF = 0;
D3D9SpecializationInfo m_specInfo = D3D9SpecializationInfo();