Skip to content

Commit

Permalink
GPU: Split backend into Backend+Presenter
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 18, 2025
1 parent 8f19ac2 commit d52bf79
Show file tree
Hide file tree
Showing 18 changed files with 1,498 additions and 1,355 deletions.
2 changes: 2 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ add_library(core
gpu_hw_shadergen.h
gpu_hw_texture_cache.cpp
gpu_hw_texture_cache.h
gpu_presenter.cpp
gpu_presenter.h
gpu_shadergen.cpp
gpu_shadergen.h
gpu_sw.cpp
Expand Down
2 changes: 2 additions & 0 deletions src/core/core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<ClCompile Include="gpu_dump.cpp" />
<ClCompile Include="gpu_hw_shadergen.cpp" />
<ClCompile Include="gpu_hw_texture_cache.cpp" />
<ClCompile Include="gpu_presenter.cpp" />
<ClCompile Include="gpu_shadergen.cpp" />
<ClCompile Include="gpu_sw.cpp" />
<ClCompile Include="gpu_sw_rasterizer.cpp" />
Expand Down Expand Up @@ -116,6 +117,7 @@
<ClInclude Include="gpu_dump.h" />
<ClInclude Include="gpu_hw_shadergen.h" />
<ClInclude Include="gpu_hw_texture_cache.h" />
<ClInclude Include="gpu_presenter.h" />
<ClInclude Include="gpu_shadergen.h" />
<ClInclude Include="gpu_sw.h" />
<ClInclude Include="gpu_sw_rasterizer.h" />
Expand Down
2 changes: 2 additions & 0 deletions src/core/core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<ClCompile Include="jogcon.cpp" />
<ClCompile Include="pio.cpp" />
<ClCompile Include="gpu_thread.cpp" />
<ClCompile Include="gpu_presenter.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="types.h" />
Expand Down Expand Up @@ -142,6 +143,7 @@
<ClInclude Include="pio.h" />
<ClInclude Include="gpu_thread.h" />
<ClInclude Include="gpu_thread_commands.h" />
<ClInclude Include="gpu_presenter.h" />
</ItemGroup>
<ItemGroup>
<None Include="gpu_sw_rasterizer.inl" />
Expand Down
4 changes: 2 additions & 2 deletions src/core/fullscreen_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8329,8 +8329,8 @@ LoadingScreenProgressCallback::~LoadingScreenProgressCallback()
}
else
{
// since this was pushing frames, we need to restore the context
GPUThread::Internal::RestoreContextAfterPresent();
// since this was pushing frames, we need to restore the context. do that by pushing a frame ourselves
GPUThread::Internal::DoRunIdle();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2062,7 +2062,7 @@ bool GPU::StartRecordingGPUDump(const char* path, u32 num_frames /* = 1 */)

// save screenshot to same location to identify it
GPUBackend::RenderScreenshotToFile(Path::ReplaceExtension(path, "png"), DisplayScreenshotMode::ScreenResolution, 85,
true, false);
false);
return true;
}

Expand Down
Loading

0 comments on commit d52bf79

Please sign in to comment.