From 7e952ab79507114b82df960592ee0d2bf5ba067d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 23 Oct 2024 10:55:18 +0200 Subject: [PATCH] Delete unused code, fix a comment. --- Common/UI/Context.cpp | 4 ++-- Common/UI/UI.cpp | 9 --------- Common/UI/UI.h | 6 ------ GPU/Common/DrawEngineCommon.cpp | 2 ++ 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index bab93547e0..7e0574c4af 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -78,7 +78,7 @@ void UIContext::Begin() { void UIContext::BeginNoTex() { draw_->BindSamplerStates(0, 1, &sampler_); - UIBegin(ui_pipeline_notex_); + ui_draw2d.Begin(ui_pipeline_notex_); } void UIContext::BeginPipeline(Draw::Pipeline *pipeline, Draw::SamplerState *samplerState) { @@ -89,7 +89,7 @@ void UIContext::BeginPipeline(Draw::Pipeline *pipeline, Draw::SamplerState *samp Draw::Texture *textures[2]{}; draw_->BindTextures(1, 2, textures); RebindTexture(); - UIBegin(pipeline); + ui_draw2d.Begin(pipeline); } void UIContext::RebindTexture() const { diff --git a/Common/UI/UI.cpp b/Common/UI/UI.cpp index 6d897b2cf8..6af11387d0 100644 --- a/Common/UI/UI.cpp +++ b/Common/UI/UI.cpp @@ -9,12 +9,3 @@ // TODO: UI should probably not own these. DrawBuffer ui_draw2d; -DrawBuffer ui_draw2d_front; - -void UIBegin(Draw::Pipeline *pipeline) { - ui_draw2d.Begin(pipeline); -} - -void UIFlush() { - ui_draw2d.Flush(); -} diff --git a/Common/UI/UI.h b/Common/UI/UI.h index 39d6855f5d..2223b3c91f 100644 --- a/Common/UI/UI.h +++ b/Common/UI/UI.h @@ -57,9 +57,3 @@ public: private: const std::vector *items_; }; - - -// Begins/flushes the two UI drawbuffers together. -void UIBegin(Draw::Pipeline *shaderSet); -void UIFlush(); - diff --git a/GPU/Common/DrawEngineCommon.cpp b/GPU/Common/DrawEngineCommon.cpp index f61c4cb70e..14d8bfbb0c 100644 --- a/GPU/Common/DrawEngineCommon.cpp +++ b/GPU/Common/DrawEngineCommon.cpp @@ -806,6 +806,8 @@ int DrawEngineCommon::ComputeNumVertsToDecode() const { return sum; } +// Takes a list of consecutive PRIM opcodes, and extends the current draw call to include them. +// This is just a performance optimization. int DrawEngineCommon::ExtendNonIndexedPrim(const uint32_t *cmd, const uint32_t *stall, u32 vertTypeID, bool clockwise, int *bytesRead, bool isTriangle) { const uint32_t *start = cmd; int prevDrawVerts = numDrawVerts_ - 1;