Unify CheckFlushOp

This commit is contained in:
Henrik Rydgård committed 2023-02-25 12:21:03 +01:00
1 parent 16eded4e1c
commit da561aa9de
10 files changed
+12 -45

No files matched your search

-10
View File
@@ -185,16 +185,6 @@ void GPU_D3D11::FinishDeferred() {
drawEngine_.FinishDeferred();
}
inline void GPU_D3D11::CheckFlushOp(int cmd, u32 diff) {
const u8 cmdFlags = cmdInfo_[cmd].flags;
if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) {
if (dumpThisFrame_) {
NOTICE_LOG(G3D, "================ FLUSH ================");
}
drawEngine_.Flush();
}
}
void GPU_D3D11::PreExecuteOp(u32 op, u32 diff) {
CheckFlushOp(op >> 24, diff);
}
-2
View File
@@ -54,8 +54,6 @@ protected:
void FinishDeferred() override;
private:
// void ApplyDrawState(int prim);
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;
void InitClear() override;
-10
View File
@@ -181,16 +181,6 @@ void GPU_DX9::FinishDeferred() {
drawEngine_.FinishDeferred();
}
inline void GPU_DX9::CheckFlushOp(int cmd, u32 diff) {
const u8 cmdFlags = cmdInfo_[cmd].flags;
if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) {
if (dumpThisFrame_) {
NOTICE_LOG(G3D, "================ FLUSH ================");
}
drawEngine_.Flush();
}
}
void GPU_DX9::PreExecuteOp(u32 op, u32 diff) {
CheckFlushOp(op >> 24, diff);
}
-1
View File
@@ -54,7 +54,6 @@ protected:
void FinishDeferred() override;
private:
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;
void InitClear() override;
-10
View File
@@ -334,16 +334,6 @@ void GPU_GLES::FinishDeferred() {
drawEngine_.FinishDeferred();
}
inline void GPU_GLES::CheckFlushOp(int cmd, u32 diff) {
const u8 cmdFlags = cmdInfo_[cmd].flags;
if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) {
if (dumpThisFrame_) {
NOTICE_LOG(G3D, "================ FLUSH ================");
}
drawEngine_.Flush();
}
}
void GPU_GLES::PreExecuteOp(u32 op, u32 diff) {
CheckFlushOp(op >> 24, diff);
}
-1
View File
@@ -65,7 +65,6 @@ protected:
void FinishDeferred() override;
private:
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;
void InitClear() override;
+10
View File
@@ -3609,3 +3609,13 @@ void GPUCommon::UpdateMSAALevel(Draw::DrawContext *draw) {
msaaLevel_ = 0;
}
}
void GPUCommon::CheckFlushOp(int cmd, u32 diff) {
const u8 cmdFlags = cmdInfo_[cmd].flags;
if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) {
if (dumpThisFrame_) {
NOTICE_LOG(G3D, "================ FLUSH ================");
}
drawEngineCommon_->DispatchFlush();
}
}
+2
View File
@@ -313,6 +313,8 @@ protected:
// TODO: Unify this. The only backend that differs is Vulkan.
virtual void FinishDeferred() {}
void CheckFlushOp(int cmd, u32 diff);
void AdvanceVerts(u32 vertType, int count, int bytesRead) {
if ((vertType & GE_VTYPE_IDX_MASK) != GE_VTYPE_IDX_NONE) {
int indexShift = ((vertType & GE_VTYPE_IDX_MASK) >> GE_VTYPE_IDX_SHIFT) - 1;
-10
View File
@@ -416,16 +416,6 @@ void GPU_Vulkan::FinishDeferred() {
drawEngine_.FinishDeferred();
}
inline void GPU_Vulkan::CheckFlushOp(int cmd, u32 diff) {
const u8 cmdFlags = cmdInfo_[cmd].flags;
if (diff && (cmdFlags & FLAG_FLUSHBEFOREONCHANGE)) {
if (dumpThisFrame_) {
NOTICE_LOG(G3D, "================ FLUSH ================");
}
drawEngine_.Flush();
}
}
void GPU_Vulkan::PreExecuteOp(u32 op, u32 diff) {
CheckFlushOp(op >> 24, diff);
}
-1
View File
@@ -71,7 +71,6 @@ protected:
void CheckRenderResized() override;
private:
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;
void InitClear() override;
void CopyDisplayToOutput(bool reallyDirty) override;