Remove unnecessary IsStarted method

This commit is contained in:
Henrik Rydgård
2026-02-16 12:29:06 +01:00
parent facf6cb4b9
commit e71ffc59a6
6 changed files with 5 additions and 26 deletions
+4 -10
View File
@@ -85,18 +85,12 @@ static GPUCommon *CreateGPUCore(GPUCore gpuCore, GraphicsContext *ctx, Draw::Dra
bool GPU_Init(GPUCore gpuCore, GraphicsContext *ctx, Draw::DrawContext *draw) {
_dbg_assert_(draw || gpuCore == GPUCORE_SOFTWARE);
_dbg_assert_(!gpu);
GPUCommon *createdGPU = CreateGPUCore(gpuCore, ctx, draw);
// This can happen on some memory allocation failure, but can probably just be ignored in practice.
if (createdGPU && !createdGPU->IsStarted()) {
delete createdGPU;
createdGPU = nullptr;
}
if (createdGPU) {
gpu = createdGPU;
gpuDebug = createdGPU;
}
gpu = createdGPU;
gpuDebug = createdGPU;
return gpu != nullptr;
}
-3
View File
@@ -70,9 +70,6 @@ public:
virtual void UpdateCmdInfo() = 0;
virtual bool IsStarted() {
return true;
}
virtual void Reinitialize();
virtual void BeginHostFrame(const DisplayLayoutConfig &config);
+1 -6
View File
@@ -437,8 +437,7 @@ SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
drawEngineCommon_ = drawEngine_;
// Push the initial CLUT buffer in case it's all zero (we push only on change.)
if (drawEngine_->transformUnit.IsStarted())
drawEngine_->transformUnit.NotifyClutUpdate(clut);
drawEngine_->transformUnit.NotifyClutUpdate(clut);
// No need to flush for simple parameter changes.
flushOnParams_ = false;
@@ -795,10 +794,6 @@ void SoftGPU::FastRunLoop(DisplayList &list) {
dirtyFlags_ = dirty;
}
bool SoftGPU::IsStarted() {
return drawEngine_ && drawEngine_->transformUnit.IsStarted();
}
void SoftGPU::ExecuteOp(u32 op, u32 diff) {
const u8 cmd = op >> 24;
const auto info = softgpuCmdInfo[cmd];
-1
View File
@@ -129,7 +129,6 @@ public:
~SoftGPU();
u32 CheckGPUFeatures() const override { return 0; }
bool IsStarted() override;
void ExecuteOp(u32 op, u32 diff) override;
void FinishDeferred() override;
int ListSync(int listid, int mode) override;
-4
View File
@@ -53,10 +53,6 @@ TransformUnit::~TransformUnit() {
delete binner_;
}
bool TransformUnit::IsStarted() {
return binner_ && decoded_;
}
SoftwareDrawEngine::SoftwareDrawEngine() {
flushOnParams_ = false;
}
-2
View File
@@ -117,8 +117,6 @@ public:
TransformUnit();
~TransformUnit();
bool IsStarted();
static WorldCoords ModelToWorldNormal(const ModelCoords& coords);
static WorldCoords ModelToWorld(const ModelCoords& coords);
static ScreenCoords ClipToScreen(const ClipCoords &coords, bool *outsideRangeFlag);