mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Unify ExecuteOp between the accelerated backends
This commit is contained in:
parent
6b91647209
commit
609a8f6d36
@ -185,19 +185,6 @@ void GPU_D3D11::FinishDeferred() {
|
||||
drawEngine_.FinishDeferred();
|
||||
}
|
||||
|
||||
void GPU_D3D11::ExecuteOp(u32 op, u32 diff) {
|
||||
const u8 cmd = op >> 24;
|
||||
const CommandInfo info = cmdInfo_[cmd];
|
||||
const u8 cmdFlags = info.flags;
|
||||
if ((cmdFlags & FLAG_EXECUTE) || (diff && (cmdFlags & FLAG_EXECUTEONCHANGE))) {
|
||||
(this->*info.func)(op, diff);
|
||||
} else if (diff) {
|
||||
uint64_t dirty = info.flags >> 8;
|
||||
if (dirty)
|
||||
gstate_c.Dirty(dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_D3D11::GetStats(char *buffer, size_t bufsize) {
|
||||
size_t offset = FormatGPUStatsCommon(buffer, bufsize);
|
||||
buffer += offset;
|
||||
|
@ -37,7 +37,6 @@ public:
|
||||
~GPU_D3D11();
|
||||
|
||||
u32 CheckGPUFeatures() const override;
|
||||
void ExecuteOp(u32 op, u32 diff) override;
|
||||
|
||||
void GetStats(char *buffer, size_t bufsize) override;
|
||||
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
|
||||
|
@ -181,19 +181,6 @@ void GPU_DX9::FinishDeferred() {
|
||||
drawEngine_.FinishDeferred();
|
||||
}
|
||||
|
||||
void GPU_DX9::ExecuteOp(u32 op, u32 diff) {
|
||||
const u8 cmd = op >> 24;
|
||||
const CommandInfo info = cmdInfo_[cmd];
|
||||
const u8 cmdFlags = info.flags;
|
||||
if ((cmdFlags & FLAG_EXECUTE) || (diff && (cmdFlags & FLAG_EXECUTEONCHANGE))) {
|
||||
(this->*info.func)(op, diff);
|
||||
} else if (diff) {
|
||||
uint64_t dirty = info.flags >> 8;
|
||||
if (dirty)
|
||||
gstate_c.Dirty(dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_DX9::GetStats(char *buffer, size_t bufsize) {
|
||||
size_t offset = FormatGPUStatsCommon(buffer, bufsize);
|
||||
buffer += offset;
|
||||
|
@ -36,7 +36,6 @@ public:
|
||||
~GPU_DX9();
|
||||
|
||||
u32 CheckGPUFeatures() const override;
|
||||
void ExecuteOp(u32 op, u32 diff) override;
|
||||
|
||||
void ReapplyGfxState() override;
|
||||
void GetStats(char *buffer, size_t bufsize) override;
|
||||
|
@ -334,19 +334,6 @@ void GPU_GLES::FinishDeferred() {
|
||||
drawEngine_.FinishDeferred();
|
||||
}
|
||||
|
||||
void GPU_GLES::ExecuteOp(u32 op, u32 diff) {
|
||||
const u8 cmd = op >> 24;
|
||||
const CommandInfo info = cmdInfo_[cmd];
|
||||
const u8 cmdFlags = info.flags;
|
||||
if ((cmdFlags & FLAG_EXECUTE) || (diff && (cmdFlags & FLAG_EXECUTEONCHANGE))) {
|
||||
(this->*info.func)(op, diff);
|
||||
} else if (diff) {
|
||||
uint64_t dirty = info.flags >> 8;
|
||||
if (dirty)
|
||||
gstate_c.Dirty(dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_GLES::GetStats(char *buffer, size_t bufsize) {
|
||||
size_t offset = FormatGPUStatsCommon(buffer, bufsize);
|
||||
buffer += offset;
|
||||
|
@ -43,8 +43,6 @@ public:
|
||||
bool IsReady() override;
|
||||
void CancelReady() override;
|
||||
|
||||
void ExecuteOp(u32 op, u32 diff) override;
|
||||
|
||||
void ReapplyGfxState() override;
|
||||
void GetStats(char *buffer, size_t bufsize) override;
|
||||
|
||||
|
@ -2706,6 +2706,19 @@ void GPUCommon::FlushImm() {
|
||||
}
|
||||
}
|
||||
|
||||
void GPUCommon::ExecuteOp(u32 op, u32 diff) {
|
||||
const u8 cmd = op >> 24;
|
||||
const CommandInfo info = cmdInfo_[cmd];
|
||||
const u8 cmdFlags = info.flags;
|
||||
if ((cmdFlags & FLAG_EXECUTE) || (diff && (cmdFlags & FLAG_EXECUTEONCHANGE))) {
|
||||
(this->*info.func)(op, diff);
|
||||
} else if (diff) {
|
||||
uint64_t dirty = info.flags >> 8;
|
||||
if (dirty)
|
||||
gstate_c.Dirty(dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void GPUCommon::Execute_Unknown(u32 op, u32 diff) {
|
||||
if ((op & 0xFFFFFF) != 0)
|
||||
WARN_LOG_REPORT_ONCE(unknowncmd, G3D, "Unknown GE command : %08x ", op);
|
||||
|
@ -108,6 +108,7 @@ public:
|
||||
|
||||
void DumpNextFrame() override;
|
||||
|
||||
void ExecuteOp(u32 op, u32 diff) override;
|
||||
virtual void PreExecuteOp(u32 op, u32 diff);
|
||||
|
||||
bool InterpretList(DisplayList &list);
|
||||
|
@ -416,19 +416,6 @@ void GPU_Vulkan::FinishDeferred() {
|
||||
drawEngine_.FinishDeferred();
|
||||
}
|
||||
|
||||
void GPU_Vulkan::ExecuteOp(u32 op, u32 diff) {
|
||||
const u8 cmd = op >> 24;
|
||||
const CommandInfo info = cmdInfo_[cmd];
|
||||
const u8 cmdFlags = info.flags;
|
||||
if ((cmdFlags & FLAG_EXECUTE) || (diff && (cmdFlags & FLAG_EXECUTEONCHANGE))) {
|
||||
(this->*info.func)(op, diff);
|
||||
} else if (diff) {
|
||||
uint64_t dirty = info.flags >> 8;
|
||||
if (dirty)
|
||||
gstate_c.Dirty(dirty);
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_Vulkan::InitDeviceObjects() {
|
||||
INFO_LOG(G3D, "GPU_Vulkan::InitDeviceObjects");
|
||||
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
|
||||
|
@ -47,8 +47,6 @@ public:
|
||||
void BeginHostFrame() override;
|
||||
void EndHostFrame() override;
|
||||
|
||||
void ExecuteOp(u32 op, u32 diff) override;
|
||||
|
||||
void GetStats(char *buffer, size_t bufsize) override;
|
||||
void DeviceLost() override; // Only happens on Android. Drop all textures and shaders.
|
||||
void DeviceRestore() override;
|
||||
|
Loading…
Reference in New Issue
Block a user