mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Unify CheckFlushOp
This commit is contained in:
parent
16eded4e1c
commit
da561aa9de
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -54,7 +54,6 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void CheckFlushOp(int cmd, u32 diff);
|
||||
void BuildReportingInfo() override;
|
||||
|
||||
void InitClear() override;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -65,7 +65,6 @@ protected:
|
||||
void FinishDeferred() override;
|
||||
|
||||
private:
|
||||
void CheckFlushOp(int cmd, u32 diff);
|
||||
void BuildReportingInfo() override;
|
||||
|
||||
void InitClear() override;
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user