mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Reimplement Bounding Box calculation using the software renderer.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user