summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
diff options
context:
space:
mode:
authorPokechu22 <Pokechu022@gmail.com>2021-02-08 15:22:10 -0800
committerPokechu22 <Pokechu022@gmail.com>2021-03-06 19:27:08 -0800
commitf749fcfa9f42cda679ff7f4288c8418d2b56b08d (patch)
tree5bcc8c255eae974638c20f1a4e76a22fcaee69e4 /Source/Core/VideoBackends/Software/SWVertexLoader.cpp
parentc27efb3f1fefa49db7962532865fbbe483f248f1 (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/VideoBackends/Software/SWVertexLoader.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWVertexLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
index 3e90f69614..fdcafc71bf 100644
--- a/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
+++ b/Source/Core/VideoBackends/Software/SWVertexLoader.cpp
@@ -183,8 +183,8 @@ static void ParseColorAttributes(InputVertexData* dst, DataReader& src,
const auto set_default_color = [](u8* color, int i) {
// The default alpha channel seems to depend on the number of components in the vertex format.
const auto& g0 = g_main_cp_state.vtx_attr[g_main_cp_state.last_id].g0;
- const u32 color_elements = i == 0 ? g0.Color0Elements : g0.Color1Elements;
- color[0] = color_elements == 0 ? 255 : 0;
+ const auto color_elements = i == 0 ? g0.Color0Elements.Value() : g0.Color1Elements.Value();
+ color[0] = color_elements == ColorComponentCount::RGB ? 255 : 0;
color[1] = 255;
color[2] = 255;
color[3] = 255;