From 70f9fc4e7526fc9cfc008a43cd33229f62be99b6 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 10 Feb 2021 18:11:31 -0800 Subject: Convert BPMemory to BitField and enum class Additional changes: - For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare. (Shift has also been renamed to scale) - In TexMode0, min_filter has been split into min_mip and min_filter. - In TexImage1, image_type is now cache_manually_managed. - The unused bit in GenMode is now exposed. - LPSize's lineaspect is now named adjust_for_aspect_ratio. --- Source/Core/VideoBackends/Software/Clipper.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/Core/VideoBackends/Software/Clipper.cpp') diff --git a/Source/Core/VideoBackends/Software/Clipper.cpp b/Source/Core/VideoBackends/Software/Clipper.cpp index 4c4e0db52d..417bc63fa3 100644 --- a/Source/Core/VideoBackends/Software/Clipper.cpp +++ b/Source/Core/VideoBackends/Software/Clipper.cpp @@ -489,13 +489,16 @@ bool CullTest(const OutputVertexData* v0, const OutputVertexData* v1, const Outp backface = normalZDir <= 0.0f; - if ((bpmem.genMode.cullmode & 1) && !backface) // cull frontfacing + // TODO: Are these tests / the definition of backface above backwards? + if ((bpmem.genMode.cullmode == CullMode::Back || bpmem.genMode.cullmode == CullMode::All) && + !backface) // cull frontfacing { INCSTAT(g_stats.this_frame.num_triangles_culled) return false; } - if ((bpmem.genMode.cullmode & 2) && backface) // cull backfacing + if ((bpmem.genMode.cullmode == CullMode::Front || bpmem.genMode.cullmode == CullMode::All) && + backface) // cull backfacing { INCSTAT(g_stats.this_frame.num_triangles_culled) return false; -- cgit v1.2.3