Permalink
Browse files

SoftRasterizer: Oops! Fix a performance regression in SoftRasterizerR…

…enderer_SSE2::ClearUsingValues() where the framebuffer was accidentally being cleared twice. (Regression from commit 7509d46.)
  • Loading branch information...
rogerman committed Feb 12, 2018
1 parent 7509d46 commit ab18de05efdcaecf80665e49fe2762411e925b39
Showing with 1 addition and 3 deletions.
  1. +1 −3 desmume/src/rasterize.cpp
@@ -2384,7 +2384,6 @@ Render3DError SoftRasterizerRenderer_SSE2::ClearUsingValues(const FragmentColor
this->_clearAttrIsFogged_v128u8 = _mm_set1_epi8(clearAttributes.isFogged);
this->_clearAttrIsTranslucentPoly_v128u8 = _mm_set1_epi8(clearAttributes.isTranslucentPoly);
size_t i = 0;
const bool doMultithreadedClear = (this->_threadCount > 0);
if (doMultithreadedClear)
@@ -2397,13 +2396,12 @@ Render3DError SoftRasterizerRenderer_SSE2::ClearUsingValues(const FragmentColor
else
{
this->ClearUsingValuesLoop(0, this->_framebufferSIMDPixCount);
i = this->_framebufferSIMDPixCount;
}
#ifdef ENABLE_SSE2
#pragma LOOPVECTORIZE_DISABLE
#endif
for (; i < this->_framebufferPixCount; i++)
for (size_t i = this->_framebufferSIMDPixCount; i < this->_framebufferPixCount; i++)
{
this->_framebufferColor[i] = clearColor6665;
this->_framebufferAttributes->SetAtIndex(i, clearAttributes);

0 comments on commit ab18de0

Please sign in to comment.