diff options
| author | JMC47 <JMC4789@gmail.com> | 2025-03-11 18:58:27 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-11 18:58:27 -0400 |
| commit | a80062f1b1fd418f933e482f1f2974fd761f3cef (patch) | |
| tree | e44461aef793d5b083b4980fdf3114a7aba93f9e /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 9b2ab6e259405ae06b4b480a0c5daa59d9b2f599 (diff) | |
| parent | fe2d247acb88c6b03973cf7b1e3f52d07acfc466 (diff) | |
Merge pull request #13400 from jordan-woyak/async-request-no-poke-merge
VideoCommon: Don't merge EFBPoke AsyncRequests.
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 1486eae124..61b059e86d 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -112,31 +112,23 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) } } -void Renderer::PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) +void Renderer::PokeEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) { if (type == EFBAccessType::PokeColor) { - for (size_t i = 0; i < num_points; i++) - { - // Convert to expected format (BGRA->RGBA) - // TODO: Check alpha, depending on mode? - const EfbPokeData& point = points[i]; - u32 color = ((point.data & 0xFF00FF00) | ((point.data >> 16) & 0xFF) | - ((point.data << 16) & 0xFF0000)); - g_framebuffer_manager->PokeEFBColor(point.x, point.y, color); - } + // Convert to expected format (BGRA->RGBA) + // TODO: Check alpha, depending on mode? + const u32 color = + ((poke_data & 0xFF00FF00) | ((poke_data >> 16) & 0xFF) | ((poke_data << 16) & 0xFF0000)); + g_framebuffer_manager->PokeEFBColor(x, y, color); } else // if (type == EFBAccessType::PokeZ) { - for (size_t i = 0; i < num_points; i++) - { - // Convert to floating-point depth. - const EfbPokeData& point = points[i]; - float depth = float(point.data & 0xFFFFFF) / 16777216.0f; - if (!g_backend_info.bSupportsReversedDepthRange) - depth = 1.0f - depth; + // Convert to floating-point depth. + float depth = float(poke_data & 0xFFFFFF) / 16777216.0f; + if (!g_backend_info.bSupportsReversedDepthRange) + depth = 1.0f - depth; - g_framebuffer_manager->PokeEFBDepth(point.x, point.y, depth); - } + g_framebuffer_manager->PokeEFBDepth(x, y, depth); } } |
