diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2021-05-29 17:00:14 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-29 17:00:14 +1000 |
| commit | b31d4400e31503861cce0bb0ccff6da71bddf277 (patch) | |
| tree | 492f8395eecd2bc65566033783a32f9456affefb /Source/Core/VideoBackends/Software | |
| parent | 7b2b05cc219c1591ab328fefabd9435aff748c08 (diff) | |
| parent | a24e78b3cf07e8d169d97a2e4c3635b9efbdba35 (diff) | |
Merge pull request #9765 from Techjar/bbox-pixel-quads-2-electric-boogaloo
VideoCommon: Move bounding box pixel quads rounding to shader
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/SWRenderer.h | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/Software/SWRenderer.cpp b/Source/Core/VideoBackends/Software/SWRenderer.cpp index 51433d311f..c128e6bd1a 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.cpp +++ b/Source/Core/VideoBackends/Software/SWRenderer.cpp @@ -126,12 +126,12 @@ u32 SWRenderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData) return value; } -u16 SWRenderer::BBoxReadImpl(int index) +u16 SWRenderer::BBoxRead(int index) { return BoundingBox::GetCoordinate(static_cast<BoundingBox::Coordinate>(index)); } -void SWRenderer::BBoxWriteImpl(int index, u16 value) +void SWRenderer::BBoxWrite(int index, u16 value) { BoundingBox::SetCoordinate(static_cast<BoundingBox::Coordinate>(index), value); } diff --git a/Source/Core/VideoBackends/Software/SWRenderer.h b/Source/Core/VideoBackends/Software/SWRenderer.h index f2434d92c0..df23e123be 100644 --- a/Source/Core/VideoBackends/Software/SWRenderer.h +++ b/Source/Core/VideoBackends/Software/SWRenderer.h @@ -39,8 +39,8 @@ public: u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) override; void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {} - u16 BBoxReadImpl(int index) override; - void BBoxWriteImpl(int index, u16 value) override; + u16 BBoxRead(int index) override; + void BBoxWrite(int index, u16 value) override; void RenderXFBToScreen(const MathUtil::Rectangle<int>& target_rc, const AbstractTexture* source_texture, diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index be6f14d610..3c932b9566 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -838,8 +838,10 @@ void Tev::Draw() EfbInterface::IncPerfCounterQuadCount(PQ_ZCOMP_OUTPUT); } - BoundingBox::Update(static_cast<u16>(Position[0]), static_cast<u16>(Position[0]), - static_cast<u16>(Position[1]), static_cast<u16>(Position[1])); + // The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values will be rounded to the + // extents of these groups, rather than the exact pixel. + BoundingBox::Update(static_cast<u16>(Position[0] & ~1), static_cast<u16>(Position[0] | 1), + static_cast<u16>(Position[1] & ~1), static_cast<u16>(Position[1] | 1)); #if ALLOW_TEV_DUMPS if (g_ActiveConfig.bDumpTevStages) |
