Reimplement Bounding Box calculation using the software renderer.

This commit is contained in:
crudelios
2014-09-14 17:52:51 +01:00
parent b7aed97508
commit 2d4b7e3f3f
13 changed files with 602 additions and 672 deletions

View File

@ -19,6 +19,7 @@
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/TextureDecoder.h"
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoCommon.h"
@ -231,7 +232,7 @@ static void BPWritten(const BPCmd& bp)
// here. Not sure if there's a better spot to put this.
// the number of lines copied is determined by the y scale * source efb height
PixelEngine::bbox_active = false;
BoundingBox::active = false;
float yScale;
if (PE_copy.scale_invert)
@ -378,13 +379,13 @@ static void BPWritten(const BPCmd& bp)
case BPMEM_CLEARBBOX2:
// Don't compute bounding box if this frame is being skipped!
// Wrong but valid values are better than bogus values...
if (g_ActiveConfig.bUseBBox && !g_bSkipCurrentFrame)
if (!g_bSkipCurrentFrame)
{
u8 offset = bp.address & 2;
PixelEngine::bbox[offset] = bp.newvalue & 0x3ff;
PixelEngine::bbox[offset | 1] = bp.newvalue >> 10;
PixelEngine::bbox_active = true;
BoundingBox::coords[offset] = bp.newvalue & 0x3ff;
BoundingBox::coords[offset + 1] = bp.newvalue >> 10;
BoundingBox::active = true;
}
return;
case BPMEM_TEXINVALIDATE: