diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-02-08 15:22:10 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-03-06 19:27:08 -0800 |
| commit | f749fcfa9f42cda679ff7f4288c8418d2b56b08d (patch) | |
| tree | 5bcc8c255eae974638c20f1a4e76a22fcaee69e4 /Source/Core/VideoCommon/VertexShaderManager.cpp | |
| parent | c27efb3f1fefa49db7962532865fbbe483f248f1 (diff) | |
Convert CPMemory to BitField and enum class
Additionally, VCacheEnhance has been added to UVAT_group1. According to YAGCD, this field is always 1.
TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value. This change was made in a way that should be backwards-compatible.
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderManager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 9c82d9b431..121d6f1a21 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -618,9 +618,9 @@ void VertexShaderManager::SetVertexFormat(u32 components) // The default alpha channel seems to depend on the number of components in the vertex format. // If the vertex attribute has an alpha channel, zero is used, otherwise one. - const u32 color_chan_alpha = - (g_main_cp_state.vtx_attr[g_main_cp_state.last_id].g0.Color0Elements ^ 1) | - ((g_main_cp_state.vtx_attr[g_main_cp_state.last_id].g0.Color1Elements ^ 1) << 1); + const auto g0 = g_main_cp_state.vtx_attr[g_main_cp_state.last_id].g0; + const u32 color_chan_alpha = (g0.Color0Elements == ColorComponentCount::RGB ? 1 : 0) | + (g0.Color1Elements == ColorComponentCount::RGB ? 2 : 0); if (color_chan_alpha != constants.color_chan_alpha) { constants.color_chan_alpha = color_chan_alpha; |
