[GPU] Public swap callback function
This commit is contained in:
parent
99d6788b2c
commit
3108677a4d
|
@ -126,7 +126,7 @@ class CommandProcessor {
|
|||
void IssueSwap(uint32_t frontbuffer_ptr, uint32_t frontbuffer_width,
|
||||
uint32_t frontbuffer_height);
|
||||
|
||||
void set_swap_request_handler(std::function<void()> fn) {
|
||||
void SetSwapCallback(std::function<void()> fn) {
|
||||
swap_request_handler_ = fn;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,8 +54,6 @@ X_STATUS GraphicsSystem::Setup(
|
|||
return X_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
command_processor_->set_swap_request_handler([]() {});
|
||||
|
||||
// Let the processor know we want register access callbacks.
|
||||
memory_->AddVirtualMappedRange(
|
||||
0x7FC80000, 0xFFFF0000, 0x0000FFFF, this,
|
||||
|
@ -113,6 +111,10 @@ void GraphicsSystem::Reset() {
|
|||
xe::FatalError("Graphics device lost (probably due to an internal error)");
|
||||
}
|
||||
|
||||
void GraphicsSystem::SetSwapCallback(std::function<void()> fn) {
|
||||
command_processor_->SetSwapCallback(fn);
|
||||
}
|
||||
|
||||
uint32_t GraphicsSystem::ReadRegisterThunk(void* ppc_context,
|
||||
GraphicsSystem* gs, uint32_t addr) {
|
||||
return gs->ReadRegister(addr);
|
||||
|
|
|
@ -62,6 +62,8 @@ class GraphicsSystem {
|
|||
|
||||
virtual void ClearCaches();
|
||||
|
||||
void SetSwapCallback(std::function<void()> fn);
|
||||
|
||||
void RequestFrameTrace();
|
||||
void BeginTracing();
|
||||
void EndTracing();
|
||||
|
|
Loading…
Reference in New Issue